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

Url type conversion from full http url with branch #109

Open
non7top opened this issue Oct 1, 2024 · 0 comments
Open

Url type conversion from full http url with branch #109

non7top opened this issue Oct 1, 2024 · 0 comments

Comments

@non7top
Copy link

non7top commented Oct 1, 2024

Description

When parsing the full github url which can point to branch and the using urls the tree/branch name should not be part of ssh and git urls.

Steps to reproduce

>>> from giturlparse import parse
>>> p=parse("https://example.com/user/repo/tree/branch")
>>> p.urls
{'https': 'https://example.com/user/repo/tree/branch.git', 'ssh': '[email protected]:user/repo/tree/branch.git', 'git': 'git://example.com/user/repo/tree/branch.git'}

Versions

Expected behaviour

[email protected]:user/repo.git
git://example.com/user/repo.git

I do not know whether it is possible to specify branch in this notation at all.

Actual behaviour

[email protected]:user/repo/tree/branch.git is invalid
git://example.com/user/repo/tree/branch.git is invalid

Additional information

I do realize this is not exactly the right "git url". The input type should probably be github_web or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant