summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-09-19 13:51:40 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-19 13:51:40 -0700
commit4c10c311376ef0cd279dace6a05e2101d60536e4 (patch)
treeec064683eb50abc2ce62808b7de80197a439c2cb /submodule.c
parentMerge branch 'jk/test-lib-drop-pid-from-results' into maint (diff)
parentsubmodule: avoid auto-discovery in prepare_submodule_repo_env() (diff)
downloadtgif-4c10c311376ef0cd279dace6a05e2101d60536e4.tar.xz
Merge branch 'jc/submodule-anchor-git-dir' into maint
Having a submodule whose ".git" repository is somehow corrupt caused a few commands that recurse into submodules loop forever. * jc/submodule-anchor-git-dir: submodule: avoid auto-discovery in prepare_submodule_repo_env()
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/submodule.c b/submodule.c
index 1b5cdfb7e7..e8258f061a 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1160,4 +1160,5 @@ 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");
}