diff options
author | Stefan Beller <sbeller@google.com> | 2017-01-03 10:30:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-07 13:10:02 -0800 |
commit | c5f3cba1266dc4feb4101f85e5596912fdb10d5b (patch) | |
tree | 0a7dea1586a8552247a21aa05a8c724f9c6501d1 /submodule.c | |
parent | e05806da9ec4aff8adfed142ab2a2b3b02e33c8c (diff) | |
download | git-c5f3cba1266dc4feb4101f85e5596912fdb10d5b.tar.gz git-c5f3cba1266dc4feb4101f85e5596912fdb10d5b.tar.xz |
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>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |