Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed#731 #934

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

Merged
Byron merged 2 commits into gitpython-developers:master from toanant:patch-1
Oct 17, 2019
Merged

Fixed#731 #934

Byron merged 2 commits into gitpython-developers:master from toanant:patch-1
Oct 17, 2019

Conversation

Copy link
Contributor

@toanant toanant commented Oct 10, 2019

Added check for local file url starting with $HOME / ~ to expand them using os.path.expanduser.

Added check for local file url starting with `$HOME` / `~` to expand them using `os.path.expanduser`.
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!
That's an interesting issue as I was already posing the question if that's indeed a capability one would expect of GitPython, as opposed to the shell. Since it's acknowledged nonetheless and I the feature (probably) doesn't hurt, it's probably OK to merge it.

Something I think should be added in any case is support for the windows version of the home directory, something common seems %UserProfile%.

#731 also reveals that similar functionality was present at some point but seemingly removed. Without a test, this may happen here again. However, I would be OK to merge without a specific test.

Thanks a lot!

@Byron Byron added this to the v3.0.4 - Bugfixes milestone Oct 11, 2019
Copy link
Contributor

stsewd commented Oct 11, 2019

As a more general solution we could use expandvars https://docs.python.org/3/library/os.path.html#os.path.expandvars

Copy link

Codecov Report

Merging #934 into master will increase coverage by 0.12%.
The diff coverage is 50%.

Impacted file tree graph

@@ Coverage Diff @@
## master #934 +/- ##
=========================================
+ Coverage 93.47% 93.6% +0.12% 
=========================================
 Files 59 59 
 Lines 9583 9804 +221 
=========================================
+ Hits 8958 9177 +219 
- Misses 625 627 +2
Impacted Files Coverage Δ
git/cmd.py 82.59% <50%> (-0.1%) ⬇️
git/objects/blob.py 100% <0%> (ø) ⬆️
git/refs/remote.py 100% <0%> (ø) ⬆️
git/test/test_diff.py 100% <0%> (ø) ⬆️
git/test/performance/test_streams.py 100% <0%> (ø) ⬆️
git/test/test_tree.py 100% <0%> (ø) ⬆️
git/test/test_exc.py 100% <0%> (ø) ⬆️
git/test/test_docs.py 99.6% <0%> (ø) ⬆️
git/test/test_refs.py 99.18% <0%> (ø) ⬆️
git/test/test_config.py 98.8% <0%> (ø) ⬆️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23b83cd...942f467. Read the comment docs.

@Byron Byron merged commit 43564d2 into gitpython-developers:master Oct 17, 2019
Copy link
Member

Byron commented Oct 17, 2019

Thanks a lot! This will work!

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

@Byron Byron Byron requested changes

Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /