From: Stefan Beller Date: Tue, 3 Jan 2017 18:30:47 +0000 (-0800) Subject: submodule.c: use GIT_DIR_ENVIRONMENT consistently X-Git-Tag: v2.12.0-rc0~68^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c5f3cba1266dc4feb4101f85e5596912fdb10d5b submodule.c: use GIT_DIR_ENVIRONMENT consistently In C code we have the luxury of having constants for all the important things that are hard coded. This is the only place in C that hard codes the git directory environment variable, so fix it. Signed-off-by: Stefan Beller Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/submodule.c b/submodule.c index ece17315d6..fa32f45033 100644 --- a/submodule.c +++ b/submodule.c @@ -1333,5 +1333,6 @@ void prepare_submodule_repo_env(struct argv_array *out) if (strcmp(*var, CONFIG_DATA_ENVIRONMENT)) argv_array_push(out, *var); } - argv_array_push(out, "GIT_DIR=.git"); + argv_array_pushf(out, "%s=%s", GIT_DIR_ENVIRONMENT, + DEFAULT_GIT_DIR_ENVIRONMENT); }