summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-11-02 16:53:26 +0900
committerJunio C Hamano <gitster@pobox.com>2023-11-02 16:53:26 +0900
commit3a16179bfbe8ef088164a7a55ef9f566828499bc (patch)
tree59ac562c4193da885df7f99367aa0e7c659bc87d
parentf6a567638bae074028ce6e182d93796ec96b92d0 (diff)
parent8b3aa36f5a7a0c923bc4a28ff19caae78644ae08 (diff)
downloadgit-3a16179bfbe8ef088164a7a55ef9f566828499bc.tar.gz
Merge branch 'ps/rewritten-is-per-worktree-doc' into maint-2.42
Doc update. * ps/rewritten-is-per-worktree-doc: doc/git-worktree: mention "refs/rewritten" as per-worktree refs
-rw-r--r--Documentation/git-worktree.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index a4fbf5e838..93d76f5d66 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -286,7 +286,8 @@ rules and how to access refs of one worktree from another.
In general, all pseudo refs are per-worktree and all refs starting with
`refs/` are shared. Pseudo refs are ones like `HEAD` which are directly
under `$GIT_DIR` instead of inside `$GIT_DIR/refs`. There are exceptions,
-however: refs inside `refs/bisect` and `refs/worktree` are not shared.
+however: refs inside `refs/bisect`, `refs/worktree` and `refs/rewritten` are
+not shared.
Refs that are per-worktree can still be accessed from another worktree via
two special paths, `main-worktree` and `worktrees`. The former gives
@@ -363,8 +364,8 @@ linked worktree `git rev-parse --git-path HEAD` returns
`/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
rev-parse --git-path refs/heads/master` uses
`$GIT_COMMON_DIR` and returns `/path/main/.git/refs/heads/master`,
-since refs are shared across all worktrees, except `refs/bisect` and
-`refs/worktree`.
+since refs are shared across all worktrees, except `refs/bisect`,
+`refs/worktree` and `refs/rewritten`.
See linkgit:gitrepository-layout[5] for more information. The rule of
thumb is do not make any assumption about whether a path belongs to