diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-01-12 10:03:06 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-12 06:55:41 -0800 |
| commit | 8947da018387f146a90e64055b4caf2ab79e39a7 (patch) | |
| tree | f9d55c90b021e3eed78cd1c2d6950172b7129929 /contrib/persistent-https | |
| parent | builtin/fsck: move generic HEAD check into `refs_fsck()` (diff) | |
| download | git-8947da018387f146a90e64055b4caf2ab79e39a7.tar.gz git-8947da018387f146a90e64055b4caf2ab79e39a7.zip | |
builtin/fsck: drop `fsck_head_link()`
The function `fsck_head_link()` was historically used to perform a
couple of consistency checks for refs. (Almost) all of these checks have
now been moved into the refs subsystem. There's only a single check
remaining that verifies whether `refs_resolve_ref_unsafe()` returns a
`NULL` pointer. This may happen in a couple of cases:
- When `refs_is_safe()` declares the ref to be unsafe. We already have
checks for this as we verify refnames with `check_refname_format()`.
- When the ref doesn't exist. A repository without "HEAD" is
completely broken though, and we would notice this error ahead of
time already.
- In case the caller passes `RESOLVE_REF_READING` and the ref is a
symref that doesn't resolve. We don't pass this flag though.
As such, this check doesn't cover anything anymore that isn't already
covered by `refs_fsck()`. Drop it, which also allows us to inline the
call to `refs_resolve_ref_unsafe()`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
