revision.h: new flag in struct rev_info wrt. worktree-related refs
commitff9445be4702d6cf6e5e8c202a15066ca355989b
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 23 Aug 2017 12:36:49 +0000 (23 19:36 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Aug 2017 21:42:21 +0000 (24 14:42 -0700)
treea1993a86d0e47ead80eb4f237252a69df451d934
parent3dc57ebfbd1bf30b9a6987f551af9b74641382a9
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>
revision.h