Global ConfigParser#950
Merged
Byron merged 4 commits intogitpython-developers:masterfrom Oct 28, 2019
Merged
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Byron
requested changes
Oct 24, 2019
Member
Byron
left a comment
There was a problem hiding this comment.
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.
Byron
approved these changes
Oct 28, 2019
Member
Byron
left a comment
There was a problem hiding this comment.
Thanks a lot for your effort! It's a great improvement!
Contributor
Author
|
Happy to help! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_levelspecified 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.