diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2010-03-27 01:53:57 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-28 20:48:25 +0400 |
commit | 8b1fa778676ae94f7a6d4113fa90947b548154dd (patch) | |
tree | ebdd33abc21f7dc32fa413bdf6b77b651c0daeda /builtin | |
parent | f1ba1c90e1704e937ff59ee510a8d46a5ab52a1a (diff) |
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.c | 6 |
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) |