Skip to content

Conversation

@Horgix
Copy link
Contributor

@Horgix Horgix commented Aug 25, 2017

Starting using GitPython, I quickly encountered a surprising behavior: a Repo instance could be initialized with a path like ~/path/to/some/repo but a Git instance couldn't. And indeed, Repo expands the path it is given while Git doesn't.

This PR is an attempt at fixing this by moving the _expand_path() method previously defined in repo/base.py to and expand_path() method in the util/ part, and using it both where it was already used and newly in the Git constructor.

@Horgix
Copy link
Contributor Author

Horgix commented Sep 3, 2017

Any chance to get some feedback on this? 🙂

@Byron
Copy link
Member

Byron commented Sep 28, 2017

Thanks a lot for your contribution, and sorry for the late reply. This looks good to me!

@Byron Byron merged commit 3eb497b into gitpython-developers:master Sep 28, 2017
@Horgix
Copy link
Contributor Author

Horgix commented Oct 9, 2017

No worries for the delay, thanks for merging 🙂

riley-martine pushed a commit to riley-martine/GitPython that referenced this pull request Dec 7, 2023
util: move expand_path from repo/base and use it in Git class init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants