Open
Description
git allows local urls in it's path
Currently the parser will put some un-helpful values in the parsed object's tuples if this is the case
Possibly there can be some kind of check for an absolute path, so that in case a user passes a local repository, they get an empty return value
Reproducing code:
$ git clone https://github.com/retr0h/git-url-parse
$ cd git-url-parse
$ pip install -e .
$ python3
>>> import giturlparse
>>> p = giturlparse.parse("/path/to/local/repository/directory/")
>>> print(p)
What we get is :
>>> print(p)
Parsed(pathname='to/local', protocols=[], protocol='ssh', href='/path/to/local/repository/directory/', resource='path', user=None, port=None, name='local', owner='to')
Probably this can be improved, since the protocol='ssh' is highly misleading, and the name, local and resource can also be put to None, along with pathname and href being the same (or preferably href None)