Inconsistent pathname definition.
oschneidewind opened this issue · 0 comments
oschneidewind commented
When evaluating this package, I noticed that the pathname of an HTTPS address is output with a leading backslash, but for an SSH address without, which means for my application that I have to check which protocol is used in order to edit the pathname if necessary.
My expectation would be that the pathname always returns the same regardless of the protocol (ideally without a leading backslash)
The following code demonstrates the issue, the assertion is triggered, which proves the inconsistent API.
html_parse = giturlparse.parse("https://github.com/coala/git-url-parse.git")
ssh_parse = giturlparse.parse(html_parse.url2ssh)
assert ssh_parse.pathname == html_parse.pathname