Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for local urls #11

Open
virresh opened this issue Apr 7, 2018 · 2 comments
Open

Support for local urls #11

virresh opened this issue Apr 7, 2018 · 2 comments

Comments

@virresh
Copy link
Member

virresh commented Apr 7, 2018

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)

@retr0h
Copy link
Collaborator

retr0h commented Apr 9, 2018

I'm not planning to implement it. If someone wants to, they are welcome to submit a PR.

@code-abil
Copy link

@virresh , @retr0h . Can i get assigned for this issue.

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

No branches or pull requests

3 participants