#Supporting Directory Arguments
1 messages ยท Page 1 of 1 (latest)
git+<https | ssh> is okay for me. go-gh uses a similar schema to parsing URLs https://github.com/cli/go-gh/blob/debe718854c4ef26135c2348fd91db360fe5bae8/internal/git/url.go#L13-L20
Git has its own URL scheme. For standard git protocol git:// for git over ssh use ssh:// for http etc, see examples https://stackoverflow.com/questions/31801271/what-are-the-supported-git-url-formats
We might also want to support scp-style repos (there's some hilarious weirdness that means git ssh urls are like a venn diagram - most repos can be expressed by both, but some can only be expressed by one, either scp-style git@... or ssh:// style. e.g. scp-style doesn't support port numbers, and they both have different root-directory resolution).
Maybe we could have a prefix? Something like git:https://..., git:git@..., etc? Not a huge fan of that either, but I don't love the custom protocol types (it feels weird to not just be able to take the copy-pasted URL from the clone button on GitHub).
We'll also need to make sure to allow specifying subpaths, as well as branches in the git URL ๐ though I think we get this for free just by using buildkits git processing
Another potentially similar case is wanting to replace files with http urls, or even with a single file extracted from git. Or even input an oci-layout or oci tarball as a container, instead of a name.
So it feels like a more generic "how do we indicate "types" of input.
I'm getting something simple going, then we can refine
Sorry, a little early on the bikeshedding ๐
all very useful