Parse included files when reading git config files

Git config files may have an include tag pointing to another file.
The included file is not parsed unless “git config --list” is
explicitly told to follow includes by adding the argument ”--includes”.

This change add the "--includes" when parsing the global gitconfig file.

Change-Id: I892c9a3a748754c1eb8c9e220578305ca5850dd5
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/264759
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Ulrik Laurén <ulrik.lauren@gmail.com>
This commit is contained in:
Ulrik Laurén 2020-04-28 01:09:57 +02:00
parent 433977e958
commit d0ca0f6814

View File

@ -362,7 +362,7 @@ class GitConfig(object):
return c return c
def _do(self, *args): def _do(self, *args):
command = ['config', '--file', self.file] command = ['config', '--file', self.file, '--includes']
command.extend(args) command.extend(args)
p = GitCommand(None, p = GitCommand(None,