aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gitrepository-layout.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-29 21:10:23 +0200
committerJunio C Hamano <gitster@pobox.com>2018-10-07 08:21:18 +0900
commit8aff1a9ca5a266020fe5b1bd8c54228581e34530 (patch)
treec787fa8cda7dfe83b7439d691ddd25204afd4ae9 /Documentation/gitrepository-layout.txt
parent5c79f74f0514a29fe182b0a442406105fb6f1660 (diff)
downloadgit-8aff1a9ca5a266020fe5b1bd8c54228581e34530.tar.gz
Add a place for (not) sharing stuff between worktrees
When multiple worktrees are used, we need rules to determine if something belongs to one worktree or all of them. Instead of keeping adding rules when new stuff comes (*), have a generic rule: - Inside $GIT_DIR, which is per-worktree by default, add $GIT_DIR/common which is always shared. New features that want to share stuff should put stuff under this directory. - Inside refs/, which is shared by default except refs/bisect, add refs/worktree/ which is per-worktree. We may eventually move refs/bisect to this new location and remove the exception in refs code. (*) And it may also include stuff from external commands which will have no way to modify common/per-worktree rules. 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/gitrepository-layout.txt')
-rw-r--r--Documentation/gitrepository-layout.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/gitrepository-layout.txt b/Documentation/gitrepository-layout.txt
index e85148f05e..89b616e049 100644
--- a/Documentation/gitrepository-layout.txt
+++ b/Documentation/gitrepository-layout.txt
@@ -95,8 +95,10 @@ refs::
References are stored in subdirectories of this
directory. The 'git prune' command knows to preserve
objects reachable from refs found in this directory and
- its subdirectories. This directory is ignored if $GIT_COMMON_DIR
- is set and "$GIT_COMMON_DIR/refs" will be used instead.
+ its subdirectories.
+ This directory is ignored (except refs/bisect and
+ refs/worktree) if $GIT_COMMON_DIR is set and
+ "$GIT_COMMON_DIR/refs" will be used instead.
refs/heads/`name`::
records tip-of-the-tree commit objects of branch `name`
@@ -165,6 +167,11 @@ hooks::
each hook. This directory is ignored if $GIT_COMMON_DIR is set
and "$GIT_COMMON_DIR/hooks" will be used instead.
+common::
+ When multiple working trees are used, most of files in
+ $GIT_DIR are per-worktree with a few known exceptions. All
+ files under 'common' however will be shared between all
+ working trees.
index::
The current index file for the repository. It is