Skip to content

Commit 69bb2e1

Browse files
jonathantanmygitster
authored andcommitted
submodule: refrain from filtering GIT_CONFIG_COUNT
14111fc ("git: submodule honor -c credential.* from command line", 2016-03-01) taught Git to pass through the GIT_CONFIG_PARAMETERS environment variable when invoking a subprocess on behalf of a submodule. But when d8d7715 ("config: allow specifying config entries via envvar pairs", 2021-01-15) introduced support for GIT_CONFIG_COUNT (and its associated GIT_CONFIG_KEY_? and GIT_CONFIG_VALUE_?), the subprocess mechanism wasn't updated to also pass through these variables. Since they are conceptually the same (d8d7715 was written to address a shortcoming of GIT_CONFIG_PARAMETERS), update the submodule subprocess mechanism to also pass through GIT_CONFIG_COUNT. Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ef7dc2e commit 69bb2e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

submodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ static void prepare_submodule_repo_env_no_git_dir(struct strvec *out)
489489
const char * const *var;
490490

491491
for (var = local_repo_env; *var; var++) {
492-
if (strcmp(*var, CONFIG_DATA_ENVIRONMENT))
492+
if (strcmp(*var, CONFIG_DATA_ENVIRONMENT) &&
493+
strcmp(*var, CONFIG_COUNT_ENVIRONMENT))
493494
strvec_push(out, *var);
494495
}
495496
}

0 commit comments

Comments
 (0)