summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Alex Riesen <raa.lkml@gmail.com>2010-03-26 23:53:57 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-03-28 09:48:25 -0700
commit8b1fa778676ae94f7a6d4113fa90947b548154dd (patch)
treeebdd33abc21f7dc32fa413bdf6b77b651c0daeda /builtin
parentMerge branch 'maint' (diff)
downloadtgif-8b1fa778676ae94f7a6d4113fa90947b548154dd.tar.xz
Allow passing of configuration parameters in the command line
The values passed this way will override whatever is defined in the config files. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 4bc46b15fd..f3d1660d02 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -197,7 +197,11 @@ static int get_value(const char *key_, const char *regex_)
git_config_from_file(show_config, system_wide, NULL);
if (do_all && global)
git_config_from_file(show_config, global, NULL);
- git_config_from_file(show_config, local, NULL);
+ if (do_all)
+ git_config_from_file(show_config, local, NULL);
+ git_config_from_parameters(show_config, NULL);
+ if (!do_all && !seen)
+ git_config_from_file(show_config, local, NULL);
if (!do_all && !seen && global)
git_config_from_file(show_config, global, NULL);
if (!do_all && !seen && system_wide)