summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-11-30 08:24:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-01 19:00:15 (GMT)
commit31e26ebcb512ad234d9725120fb4f5670ff75625 (patch)
tree065370d0f48d3a715c888e2ee4bf796c45a11f16 /Documentation
parente61a509a497520550b5b84b753a95549158f9f1c (diff)
downloadgit-31e26ebcb512ad234d9725120fb4f5670ff75625.zip
git-31e26ebcb512ad234d9725120fb4f5670ff75625.tar.gz
git-31e26ebcb512ad234d9725120fb4f5670ff75625.tar.bz2
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt2
-rw-r--r--Documentation/git-rev-parse.txt3
2 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 9220725..e1623ec 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -393,6 +393,8 @@ false), while all other repositories are assumed to be bare (bare
core.worktree::
Set the path to the root of the working tree.
+ If GIT_COMMON_DIR environment variable is set, core.worktree
+ is ignored and not used for determining the root of working tree.
This can be overridden by the GIT_WORK_TREE environment
variable and the '--work-tree' command-line option.
The value can be an absolute path or relative to the path to
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 2103bbf..97fc703 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -216,6 +216,9 @@ If `$GIT_DIR` is not defined and the current directory
is not detected to lie in a Git repository or work tree
print a message to stderr and exit with nonzero status.
+--git-common-dir::
+ Show `$GIT_COMMON_DIR` if defined, else `$GIT_DIR`.
+
--is-inside-git-dir::
When the current working directory is below the repository
directory print "true", otherwise "false".