Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support #ref as npm does #16

Closed
dankegel opened this issue May 24, 2018 · 1 comment
Closed

Support #ref as npm does #16

dankegel opened this issue May 24, 2018 · 1 comment
Labels

Comments

@dankegel
Copy link

dankegel commented May 24, 2018

Some systems, e.g. npm, support specifying a commit or branch by adding #commit at the end of the url; see
https://docs.npmjs.com/files/package.json#git-urls-as-dependencies

After this feature is implemented, one would expect

git clone https://github.com/retr0h/git-url-parse
cd git-url-parse
pip3 install --user -e .
python3 -c 'import giturlparse; print(giturlparse.parse("[email protected]:hi/there#rel-1.1"))'

to output e.g.

Parsed(pathname='hi/there', protocols=[], protocol='ssh', href='[email protected]:hi/there#rel-1.1', resource='gitlab.com', user='git', port=None, name='there', owner='hi', ref='rel-1.1')

or possibly

Parsed(pathname='hi/there', protocols=[], protocol='ssh', href='[email protected]:hi/there', resource='gitlab.com', user='git', port=None, name='there', owner='hi', ref='rel-1.1')

(because arguably href should be what one passes to 'git clone')

@dankegel
Copy link
Author

@retr0h retr0h added the invalid label Mar 7, 2019
@retr0h retr0h closed this as completed Mar 7, 2019
@dankegel dankegel changed the title Support #ref has npm does Support #ref as npm does Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants