summaryrefslogtreecommitdiff
path: root/test-submodule-config.c
diff options
context:
space:
mode:
authorLibravatar Jacob Keller <jacob.keller@gmail.com>2016-02-29 14:58:35 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-03-01 12:24:22 -0800
commit14111fc49272a70ceaeb5039796fbceb8a6e1cb7 (patch)
tree8f4a8499b97577d61dac31de1baca228a05915e4 /test-submodule-config.c
parentquote: implement sq_quotef() (diff)
downloadtgif-14111fc49272a70ceaeb5039796fbceb8a6e1cb7.tar.xz
git: submodule honor -c credential.* from command line
Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule commands. However, GIT_CONFIG_PARAMETERS is special, and we actually do want to preserve these settings. However, we do not want to preserve all configuration as many things should be left specific to the parent project. Add a git submodule--helper function, sanitize-config, which shall be used to sanitize GIT_CONFIG_PARAMETERS, removing all key/value pairs except a small subset that are known to be safe and necessary. Replace all the calls to clear_local_git_env with a wrapped function that filters GIT_CONFIG_PARAMETERS using the new helper and then restores it to the filtered subset after clearing the rest of the environment. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-submodule-config.c')
0 files changed, 0 insertions, 0 deletions