Closed yyugh closed 1 year ago
Both urls are valid, but the one that starts with "ssh://" can't be parsed.
>>> import giturlparse >>> p=giturlparse.parse("git@gitlab.example.com:groupA/projectB.git") >>> vars(p) {'_parsed': defaultdict(<function parse.<locals>.<lambda> at 0x105291700>, {'port': '', 'path_raw': '', 'groups_path': '', '_user': 'git', 'protocols': [], 'protocol': 'ssh', 'domain': 'gitlab.example.com', 'pathname': 'groupA/projectB.git', 'owner': 'groupA', 'repo': 'projectB', 'path': '', 'branch': '', 'url': 'git@gitlab.example.com:groupA/projectB.git', 'platform': 'gitlab'}), 'port': '', 'path_raw': '', 'groups_path': '', '_user': 'git', 'protocols': [], 'protocol': 'ssh', 'domain': 'gitlab.example.com', 'pathname': 'groupA/projectB.git', 'owner': 'groupA', 'repo': 'projectB', 'path': '', 'branch': '', 'url': 'git@gitlab.example.com:groupA/projectB.git', 'platform': 'gitlab', '_platform_obj': <giturlparse.platforms.gitlab.GitLabPlatform object at 0x1052a9640>} >>> p1=giturlparse.parse("ssh://git@gitlab.example.com/groupA/projectB.git") >>> vars(p1) {'_parsed': defaultdict(<function parse.<locals>.<lambda> at 0x10533e820>, {'port': '', 'path_raw': '', 'groups_path': ''}), 'port': '', 'path_raw': '', 'groups_path': ''}
0.10.0
Fix by #52, thanks for reporting this
Description
Both urls are valid, but the one that starts with "ssh://" can't be parsed.
Steps to reproduce
Versions
0.10.0
Expected behaviour
Actual behaviour
Additional information