path: root/trace.c
diff options
authorNguyễn Thái Ngọc Duy <>2014-11-30 08:24:44 (GMT)
committerJunio C Hamano <>2014-12-01 19:00:15 (GMT)
commit31e26ebcb512ad234d9725120fb4f5670ff75625 (patch)
tree065370d0f48d3a715c888e2ee4bf796c45a11f16 /trace.c
parente61a509a497520550b5b84b753a95549158f9f1c (diff)
setup.c: support multi-checkout repo setup
The repo setup procedure is updated to detect $GIT_DIR/commondir and set $GIT_COMMON_DIR properly. The core.worktree is ignored when $GIT_COMMON_DIR is set. This is because the config file is shared in multi-checkout setup, but checkout directories _are_ different. Making core.worktree effective in all checkouts mean it's back to a single checkout. Helped-by: Johannes Sixt <> Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'trace.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/trace.c b/trace.c
index 4778608..bc3f53d 100644
--- a/trace.c
+++ b/trace.c
@@ -312,6 +312,7 @@ void trace_repo_setup(const char *prefix)
prefix = "(null)";
trace_printf_key(&key, "setup: git_dir: %s\n", quote_crnl(get_git_dir()));
+ trace_printf_key(&key, "setup: git_common_dir: %s\n", quote_crnl(get_git_common_dir()));
trace_printf_key(&key, "setup: worktree: %s\n", quote_crnl(git_work_tree));
trace_printf_key(&key, "setup: cwd: %s\n", quote_crnl(cwd));
trace_printf_key(&key, "setup: prefix: %s\n", quote_crnl(prefix));