From 2b64fc894dada0916558fd0bfd19c50631f978cb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 23 Aug 2010 15:16:00 -0400 Subject: pass "git -c foo=bar" params through environment Git uses the "-c foo=bar" parameters to set a config variable for a single git invocation. We currently do this by making a list in the current process and consulting that list in git_config. This works fine for built-ins, but the config changes are silently ignored by subprocesses, including dashed externals and invocations to "git config" from shell scripts. This patch instead puts them in an environment variable which we consult when looking at config (both internally and via calls "git config"). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git.c') diff --git a/git.c b/git.c index 17538117a5..e4cd016057 100644 --- a/git.c +++ b/git.c @@ -136,7 +136,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) fprintf(stderr, "-c expects a configuration string\n" ); usage(git_usage_string); } - git_config_parse_parameter((*argv)[1]); + git_config_push_parameter((*argv)[1]); (*argv)++; (*argc)--; } else { -- cgit v1.2.3