fix git-annex repair false positive
authorJoey Hess <joeyh@joeyh.name>
Wed, 4 May 2022 15:32:23 +0000 (11:32 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 4 May 2022 15:32:23 +0000 (11:32 -0400)
commit0406c33f588663adf853aaea1ebfcb8f3f562b28
treed055da4081a8d5158877c9deb3c1687fda287b73
parentd0b1ecf464eaebbe944cec9d98ba29f9b0cdb968
fix git-annex repair false positive

Avoid treating refs/annex/last-index or other refs that are not commit
objects as evidence of repository corruption.

The repair code checks to find bad refs by trying to run `git log` on
them, and assumes that no output means something is broken.  But git log
on a tree object is empty.

This was worth fixing generally, not as a special case, since it's certainly
possible that other things store tree or other objects in refs.

Sponsored-by: Max Thoursie on Patreon
CHANGELOG
Git/Repair.hs
doc/bugs/git_annex_repair_failed__58___missing_objects.mdwn
doc/bugs/git_annex_repair_failed__58___missing_objects/comment_3_317bee33fe675a5abb6fe65540a33d25._comment [new file with mode: 0644]