Conversation
22c432d to
1a35886
Compare
git+ IRIs support for cloning, wrong docs about usages
git+ IRIs support for cloning, wrong docs about usagesgit+ IRIs for cloning, wrong docs about usages
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
1a35886 to
b428916
Compare
for more information, see https://pre-commit.ci
git+ IRIs for cloning, wrong docs about usagesgit+ IRIs
| the project is chosen. The order in which different methods are tried is | ||
| unspecified and may change in the future. | ||
|
|
||
| Sysand currently supports (i.e. knows how to obtain) these IRI schemes: |
There was a problem hiding this comment.
I see ssh://git, but there seems to be more things supported not examplified here, such as http/https/file sections
There was a problem hiding this comment.
That can wait. ssh://git was specifically mentioned here to prevent people from trying to use the shorthand, as the shorthand is directly given by the GH UI and is the simplest way to refer to a repo (no messing with authentication vars, sysand uses standard OS ssh keys).
I would like to add support for shorthand ssh syntax at some point, as it's the standard way of referring to git repos.
Many more examples could be added here, but I'll leave it for the future:
- directly referring to a file/directory in a GitHub/GitLab repo
- public and private repos, explaining authentication (ssh/bearer token)
- multiple ways of referring to the same stuff: as a git repo/as a file or folder in the repo/as a release asset of the repo/api vs non-api (at least for GitHub)
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
for more information, see https://pre-commit.ci
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
|
I'm trying to figure out what is supported, its not obvious to me in order to review and test! git+file # git+file test OK
mkdir -p /tmp/a && cd /tmp/a
cargo run --manifest-path ~/dev/sensmetry/sysand/Cargo.toml clone git+https://github.com/consideRatio/sysand-test-project
# git+file test OK
mkdir -p /tmp/b && cd /tmp/b
cargo run --manifest-path ~/dev/sensmetry/sysand/Cargo.toml clone git+file:///home/erik/dev/consideRatio/sysand-test-project
# git+ssh test
# - several users likely mistakenly use `:` between host and path, and get "failed to canonicalize iri", an error message that could be improved
# - case sensitive in path, can get stuck if redirected (consideratio instead of consideRatio)
mkdir -p /tmp/c && cd /tmp/c
cargo run --manifest-path ~/dev/sensmetry/sysand/Cargo.toml clone git+ssh://git@github.com/consideRatio/sysand-test-projectRan out of time to work this further today, gtg from work now! |
The scheme string itself, or the path? |
The path -- i had written consideRatio but my folder was named consideratio |
Look into this. We use gix, which should match git's behaviour. If fixing requires changes to gix, should at least try to error out and not get stuck. |
Why is case sensitivity unexpected? This is a path, and so follows rules of the filesystem/OS. |
Ah, got thinking it wasn't case sensitive on my system, but it was. |
consideRatio
left a comment
There was a problem hiding this comment.
I had intermittent network issues in the office influencing SSH greatly, but it was unrelated.
I also conclude that you can't do a trivial ":" check to help users towards using / as a separator between host and path, as you may use : like host[:port]/pat, so skipping it for now, and skipping adding tests for now also.
git+URLs.Tested
sysand clonewith the following, all pointing to a git repo:git+filegit+httpsfor public repo (https://github.com/andrius-puksta-sensmetry/test-sysml-project)git+sshfor the same repo, both public and privatesshfor the same public repohttpsfor the same public repoNotes by Erik
Here is how I ran the same tests manually. I ran into unrelated networking issues that confused me initially though.