Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upConfigparser does not respect order of config files with includes #627
Labels
Comments
@DanielSiepmann Thanks for the detailed description, and for the fix! Please have a look at my review - I hope to be able to merge the fix soon and create a new release accordingly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you have an include statement in the user
.gitconfig
there content will take precedence over the local.git/config
of the repository.E.g. the following code:
entry = repo.config_reader().get_value('gitlab', 'url')
With the following config setup:
~/.gitconfig
:~/.gitconfig-local
:.git/config
:Will return
url2
I would expect to receiveurl3
instead as local config should take precedence as the include was in a more global config.Looks like the issue resides inside the
read
function e.g.GitPython/git/config.py
Line 427 in c823d48
As the function is just to big, I'm not able to provide a fix.
Versions in use: