Skip to content

Fixed#731 - #934

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

Fixed#731#934
Byron merged 2 commits into
gitpython-developers:masterfrom
toanant:patch-1

Conversation

@toanant

Copy link
Copy Markdown
Contributor

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`.

@ByronByron left a comment

Copy link
Copy Markdown
Member

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!

@ByronByron added this to the v3.0.4 - Bugfixes milestone Oct 11, 2019
@stsewd

Copy link
Copy Markdown
Contributor

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

@codecov-io

Copy link
Copy Markdown

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 FilesCoverage Δ
git/cmd.py82.59% <50%> (-0.1%)⬇️
git/objects/blob.py100% <0%> (ø)⬆️
git/refs/remote.py100% <0%> (ø)⬆️
git/test/test_diff.py100% <0%> (ø)⬆️
git/test/performance/test_streams.py100% <0%> (ø)⬆️
git/test/test_tree.py100% <0%> (ø)⬆️
git/test/test_exc.py100% <0%> (ø)⬆️
git/test/test_docs.py99.6% <0%> (ø)⬆️
git/test/test_refs.py99.18% <0%> (ø)⬆️
git/test/test_config.py98.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:masterOct 17, 2019
@Byron

Copy link
Copy Markdown
Member

Thanks a lot! This will work!

Sign up for freeto 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.

4 participants

@toanant@stsewd@codecov-io@Byron