]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: use prepare_submodule_repo_env consistently
authorJeff King <peff@peff.net>
Thu, 28 Apr 2016 13:39:15 +0000 (09:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Apr 2016 19:15:29 +0000 (12:15 -0700)
commitc12e8656700be6084aec49df66447e701fda1ecf
treeece62f579fa799a8345d42972671d01c272aec6e
parent4638728c632e59715b7346ddeca83528d37a4894
submodule: use prepare_submodule_repo_env consistently

Before 14111fc (git: submodule honor -c credential.* from
command line, 2016-02-29), it was sufficient for code which
spawned a process in a submodule to just set the child
process's "env" field to "local_repo_env" to clear the
environment of any repo-specific variables.

That commit introduced a more complicated procedure, in
which we clear most variables but allow through sanitized
config. For C code, we used that procedure only for cloning,
but not for any of the programs spawned by submodule.c. As a
result, things like "git fetch --recurse-submodules" behave
differently than "git clone --recursive"; the former will
not pass through the sanitized config.

We can fix this by using prepare_submodule_repo_env()
everywhere in submodule.c.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
t/t5550-http-fetch-dumb.sh