Skip to content

Conversation

@benthayer
Copy link
Contributor

fixes#775

We can instantiate a GitConfigParser with no files specified, if we do so, then it'll figure out where those files are. It does this by either having a config_level specified to it or, in the case of a config reader, by default we might want to read from all configuration levels, just like is currently the case in Repo.config_writer(), so we iterate through all of them (except repository level) and add all files to the parser.

If the repository level is specified, we raise a unique ValueError telling the user to use the Repo object instead.

@codecov-io
Copy link

Codecov Report

Merging #950 into master will decrease coverage by 0.01%.
The diff coverage is 22.72%.

Impacted file tree graph

@@ Coverage Diff @@## master #950 +/- ## ========================================= - Coverage 93.52% 93.5% -0.02%  ========================================= Files 59 59 Lines 9677 9915 +238 ========================================= + Hits 9050 9271 +221 - Misses 627 644 +17
Impacted FilesCoverage Δ
git/config.py88.4% <22.72%> (-3.87%)⬇️
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 dfa0eac...d6c4415. Read the comment docs.

@benthayerbenthayer mentioned this pull request Oct 23, 2019
@ByronByron added this to the v3.0.5 - Bugfixes milestone Oct 24, 2019
Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution, it's looking great! I particularly like that the change is implemented without breaking compatibility.

There are just two minor things I saw when reviewing, please let me know what you think about them.

Copy link
Member

@ByronByron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your effort! It's a great improvement!

@ByronByron merged commit 87a103d into gitpython-developers:masterOct 28, 2019
@benthayer
Copy link
ContributorAuthor

Happy to help!

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.

Reading and writing global configuration parameters

3 participants

@benthayer@codecov-io@Byron