Subject: [RFC PATCH 0/3] Make fsck check other worktree HEADs

From: Elijah Newren <[email-masked]>
Date: Fri, 9 Feb 2018 15:13:27 -0800

This patchset adds checking of other worktree HEADs to fsck.

The reason I've marked this RFC is that I'm worried my incidental
reliance on "worktrees/$WORKTREE/HEAD" resolving as a ref (in patch 3)
might raise some flags for others.  In particular, in [1] Peff said
that this refname resolves right now mostly by accident and will
probably stop working in the future.  However, I feel that since fsck
checks the storage format as well as contents, it seems natural that a
change of storage model would result in the fsck code changing and
thus that I'm not locking in any particular ref format long term with
these changes.  But I want to flag this issue for discussion.

[1] https://public-inbox.org/git/[email-masked]/

Elijah Newren (3):
  fsck: Move fsck_head_link() to get_default_heads() to avoid some
    globals
  t1450-fsck: Add tests for HEAD of other worktrees
  fsck: Check HEAD of other worktrees as well

 builtin/fsck.c  | 73 ++++++++++++++++++++++++++++++++++++++++++++-------------
 t/t1450-fsck.sh | 27 +++++++++++++++++++++
 2 files changed, 84 insertions(+), 16 deletions(-)

-- 
2.16.1.75.gc01c8fdd7d