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

Global ConfigParser #950

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 4 commits into gitpython-developers:master from benthayer:global_config
Oct 28, 2019
Merged

Conversation

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.

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

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

@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 a lot for your effort! It's a great improvement!

@Byron Byron merged commit 87a103d into gitpython-developers:master Oct 28, 2019
Copy link
Contributor Author

Happy to help!

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

@Byron Byron Byron approved these changes

Assignees
No one assigned
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Reading and writing global configuration parameters

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