mirror of
https://github.com/git/git.git
synced 2026-01-09 01:34:00 +00:00
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 <j6t@kdbg.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e61a509a49
commit
31e26ebcb5
1
trace.c
1
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));
|
||||
|
||||
Reference in New Issue
Block a user