Skip to content
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

Global ConfigParser #950

Merged
merged 4 commits into from Oct 28, 2019
Merged

Global ConfigParser #950

merged 4 commits into from Oct 28, 2019

Conversation

@benthayer
Copy link
Contributor

@benthayer benthayer commented Oct 23, 2019

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-io codecov-io commented Oct 23, 2019

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 Files Coverage Δ
git/config.py 88.4% <22.72%> (-3.87%) ⬇️
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 dfa0eac...d6c4415. Read the comment docs.

@Byron Byron added this to the v3.0.5 - Bugfixes milestone Oct 24, 2019
Copy link
Member

@Byron Byron left a 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.

git/config.py Outdated Show resolved Hide resolved
git/config.py Outdated Show resolved Hide resolved
@Byron
Byron approved these changes Oct 28, 2019
Copy link
Member

@Byron Byron left a comment

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

@Byron Byron merged commit 87a103d into gitpython-developers:master Oct 28, 2019
1 of 3 checks passed
1 of 3 checks passed
DeepSource: Python Analysis Failed: Issues detected that need attention.
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@benthayer
Copy link
Contributor Author

@benthayer benthayer commented Oct 28, 2019

Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.