Support for local urls
- Dominant language
- Python
- Stars
- 30
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
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)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.