Skip to content

Commit ff9445b

Browse files
pcloudsgitster
authored andcommitted
revision.h: new flag in struct rev_info wrt. worktree-related refs
The revision walker can walk through per-worktree refs like HEAD or SHA-1 references in the index. These currently are from the current worktree only. This new flag is added to change rev-list behavior in this regard: When single_worktree is set, only current worktree is considered. When it is not set (which is the default), all worktrees are considered. The default is chosen so because the two big components that rev-list works with are object database (entirely shared between worktrees) and refs (mostly shared). It makes sense that default behavior goes per-repo too instead of per-worktree. The flag will eventually be exposed as a rev-list argument with documents. For now it stays internal until the new behavior is fully implemented. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3dc57eb commit ff9445b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

revision.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ struct rev_info {
9696
topo_order:1,
9797
simplify_merges:1,
9898
simplify_by_decoration:1,
99+
single_worktree:1,
99100
tag_objects:1,
100101
tree_objects:1,
101102
blob_objects:1,

0 commit comments

Comments
 (0)