Conversation
lib/chibi/snow/commands.scm
Outdated
| (let* ((uri (string->uri (cadr url-pair))) | ||
| (let* ((uri-str (let ((uri (cadr url-pair))) | ||
| (if (string=? (string-copy uri 0 4) "git@") | ||
| (string-append "ssh://" |
There was a problem hiding this comment.
So git@foo becomes ssh://foo but ssh://git@foo stays the same?
I think we want to drop the git@ iff using https.
There was a problem hiding this comment.
The default is to make the url https url unless --use-ssh-url argument is passed. The git@foo is ssh url so it should be transformed into https or left alone. I tried to be clever and thought adding ssh:// infront before the previous fixing would be enough.
So yes you are right, thank you. I'll fix it.
|
--use-ssh-url? flag seems not to work. Repo I use for testing https://github.com/Retropikzel/snow-chibi-testing Gives: Could it be related to #1068? It could very well be my code but I think it worked when I initially made this functionality. I also tries --use-ssh-url?=t. |
|
The problem still exists, previous commit just fixed the name to have question mark at the end. |
|
My bad, I had specced it wrong. --use-ssh-url? is working now |
| (uri->string | ||
| (uri-with-scheme (string->uri url) 'ssh))) | ||
| ((string-prefix? "https://" url) url) | ||
| (else (error "Could not fix repository url" url))))))) |
There was a problem hiding this comment.
Probably better just to allow any other url here. Some old sites might still use http://, and there's no reason to forbid other protocols like ftp:// since we shell out to curl and it supports them.
There was a problem hiding this comment.
This is the url taken from the git repository with command git config --get remote.origin.url so I dont think there should be any other prefix than git@, https, or ssh?
The error on the else is because if there is any other url it is with high likelihood a private one, and for publishing packages presumably a public is preferred. So I'm hoping that any user who runs into this error would report it, and handling (private -> public, unless --use-ssh-url is given) for their url can be added then.
|
Thank you! |
Github repos did not index correctly before, this fixes it.