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 <sbeller@google.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Jan 3, 2017 at 10:30 UTC
c5f3cba1266dc4feb4101f85e5596912fdb10d5b
1 file changed
+2
-1
submodule.c
+2
-1
@@ -1333,5 +1333,6 @@ void prepare_submodule_repo_env(struct argv_array *out)
1333
if (strcmp(*var, CONFIG_DATA_ENVIRONMENT))
1334
argv_array_push(out, *var);
1335
}
1336
- argv_array_push(out, "GIT_DIR=.git");
1336
+ argv_array_pushf(out, "%s=%s", GIT_DIR_ENVIRONMENT,
1337
+ DEFAULT_GIT_DIR_ENVIRONMENT);
1338
}