From 9727336b31c055e4507248703b8a4a8ed039dc06 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Mon, 12 Jan 2026 10:03:05 +0100 Subject: builtin/fsck: move generic HEAD check into `refs_fsck()` Move the check that detects "HEAD" refs that do not point at a branch into `refs_fsck()`. This follows the same motivation as the preceding commit. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- builtin/fsck.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'builtin') diff --git a/builtin/fsck.c b/builtin/fsck.c index 4dd4d74d1e..5dda441f45 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -728,13 +728,6 @@ static void fsck_head_link(const char *head_ref_name, error(_("invalid %s"), head_ref_name); return; } - if (strcmp(*head_points_at, head_ref_name) && - !starts_with(*head_points_at, "refs/heads/")) { - errors_found |= ERROR_REFS; - error(_("%s points to something strange (%s)"), - head_ref_name, *head_points_at); - return; - } return; } -- cgit v1.3