setup.c: support multi-checkout repo setup
commit31e26ebcb512ad234d9725120fb4f5670ff75625
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:44 +0000 (30 15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:15 +0000 (1 11:00 -0800)
tree065370d0f48d3a715c888e2ee4bf796c45a11f16
parente61a509a497520550b5b84b753a95549158f9f1c
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>
Documentation/config.txt
Documentation/git-rev-parse.txt
builtin/rev-parse.c
cache.h
environment.c
setup.c
t/t1501-worktree.sh
t/t1510-repo-setup.sh
trace.c