{"thread":{"id":"38405","subject":"git config --global not picking up includes","startedAt":"2015-01-19T19:37:10Z","lastAt":"2015-01-19T19:58:47Z","messageCount":2,"participants":["Jim Garrison","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"254904","messageId":"54BD5CE6.2060309@garrison.cc","threadId":"38405","inReplyTo":null,"subject":"git config --global not picking up includes","fromName":"Jim Garrison","fromEmail":"jim@garrison.cc","sentAt":"2015-01-19T19:37:10Z","receivedAt":"2015-01-19T19:37:10Z","isPatch":false,"sender":{"key":"jim@garrison.cc","avatar":null},"body":"I have found that `git config --global` does not pick up any include \ndirectives in the git config file.\n\nFor instance, my ~/.gitconfig contains the following:\n\n     [include]\n         path = /home/garrison/gitconfig-include\n\nAnd ~/gitconfig-include in turn contains\n\n     [user]\n         name = Jim Garrison\n\nHowever, when I pass the --global flag to git config, my name is not \npicked up:\n\n     $ git config --global user.name\n     $ git config user.name\n     Jim Garrison\n\nIf I instead replace .gitconfig with the contents of gitconfig-include \n(and in turn remove the include step), everything works as expected.\n\n     $ git config --global user.name\n     Jim Garrison\n     $ git config user.name\n     Jim Garrison\n\nI am using the latest git master, built on Debian jessie.\n"},{"id":"254905","messageId":"20150119195847.GA8945@peff.net","threadId":"38405","inReplyTo":"54BD5CE6.2060309@garrison.cc","subject":"[PATCH] git-config: better document default behavior for `--include`","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-19T19:58:47Z","receivedAt":"2015-01-19T19:58:47Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 19, 2015 at 11:37:10AM -0800, Jim Garrison wrote:\n\n> I have found that `git config --global` does not pick up any include\n> directives in the git config file.\n\nThat's by design. You asked for the entries in a specific file, and we\ndo not follow any includes by default in that case. You can use\n`--include` if you want to follow includes.\n\nThe documentation is quite misleading here, though. Here's a patch.\n\n-- >8 --\nSubject: git-config: better document default behavior for `--include`\n\nAs described in the commit message of 9b25a0b (config: add\ninclude directive, 2012-02-06), the `--include` option is\nonly on by default in some cases. But our documentation\ndescribed it as just \"defaults to on\", which doesn't tell\nthe whole story.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n Documentation/git-config.txt | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/git-config.txt b/Documentation/git-config.txt\nindex 9dfa1a5..d42c062 100644\n--- a/Documentation/git-config.txt\n+++ b/Documentation/git-config.txt\n@@ -215,7 +215,9 @@ See also <<FILES>>.\n \n --[no-]includes::\n \tRespect `include.*` directives in config files when looking up\n-\tvalues. Defaults to on.\n+\tvalues. Defaults to `off` when a specific file is given (e.g.,\n+\tusing `--file`, `--global`, etc) and `on` when searching all\n+\tconfig files.\n \n [[FILES]]\n FILES\n-- \n2.2.1.425.g441bb3c\n"}]}