From c5f3cba1266dc4feb4101f85e5596912fdb10d5b Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 3 Jan 2017 10:30:47 -0800 Subject: [PATCH] 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 --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index ece17315d..fa32f4503 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); } -- 2.11.0