Skip to content

RFC Make fsck check other worktree HEADs

Elijah Newren git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fsck: Move fsck_head_link() to get_default_heads() to avoid some globalsbuiltin/fsck.c+16 -110 replies
2/3t1450-fsck: Add tests for HEAD of other worktreest/t1450-fsck.sh+27 -00 replies
3/3fsck: Check HEAD of other worktrees as wellbuiltin/fsck.c t/t1450-fsck.sh+51 -153 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Make fsck check other worktree HEADs

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 protected]/

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(-)
Signature · 1 line
2.16.1.75.gc01c8fdd7d