Skip to content

Url type conversion from full http url with branch #109

Description

@non7top

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': 'git@example.com:user/repo/tree/branch.git', 'git': 'git://example.com/user/repo/tree/branch.git'}

Versions

Expected behaviour

git@example.com: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

git@example.com: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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions