yi-jiayu / git-get

Clone git repositories into namespaced directories like go get

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support generic Git URLs

yi-jiayu opened this issue · comments

The git-clone man page specifies many different forms of valid Git URLs: https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a.

git-get currently only supports an extremely restricted subset of Git URLs, basically just the URLs offered by the "Clone" button on GitHub and GitLab.

We should be able to handle repository URLs from other hosts and protocols as long as we can determine a reasonable path to clone the repository into.

Some suggestions would be to use an external library such as https://github.com/whilp/git-urls, or a more elaborate regular expression like https://regex101.com/r/Zsk1Tn/3.