Skip to content

included config files should be processed right away, and not just after the current file is already loaded #701

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

Open
yarikoptic opened this issue Nov 27, 2017 · 1 comment

Comments

@yarikoptic
Copy link
Contributor

I didn't know at all (or just successfully forgotten) that git allows to include other config files.
While making a humble attempt at #700 I did RTFM to see

   The contents of the included file are inserted immediately, as if they
   had been found at the location of the include directive

So, with the sample git config files in #700 you would get

$> git config -f git/test/fixtures/git_config --includes --get sec.var1
fatal: bad config line 26 in file git/test/fixtures/git_config

$> sed -i -e 's,  gui ,gui,g' git/test/fixtures/git_config # for now   

$> git config -f git/test/fixtures/git_config --includes --get sec.var0
value0_included

$> git config -f git/test/fixtures/git_config --includes --get sec.var1
value1_main

whenever the test added in #700 (https://github.com/gitpython-developers/GitPython/pull/700/files#diff-1d9cdcd948df3c80edc698aac95bfa27R100) reveals that GitPython does not "load right away". Since I felt that it is a bit of a big RF to do, didn't attempt it yet

@Byron
Copy link
Member

Byron commented Dec 11, 2017

Thanks for making the issue clear! I wonder if the fix for that already landed, as I vaguely remember a fix for something similar having been merged.

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

No branches or pull requests

2 participants