archive mirror
 help / color / mirror / Atom feed
* git fsck does not check the packed-refs file
@ 2024-01-18  8:02 R. Diez
  2024-01-18 11:15 ` Patrick Steinhardt
  0 siblings, 1 reply; 3+ messages in thread
From: R. Diez @ 2024-01-18  8:02 UTC (permalink / raw)
  To: git

Hi all:

I have been hit by an unfortunate system problem, and as a result, a few files in my Git repository got corrupted on my last git push. Some random blocks of bytes were overwritten with binary zeros, so I started getting weird unpacking errors etc.

It took a while to realise what the problem was. During my investigation, I ran "git fsck", which reported no problems, and then "git push" failed.

One of the very few corrupted files was packed-refs. This is a text file, so it was easy to compare it and see the corrupting binary zeros. But that made me wonder what "git fsck" checks.

I am guessing that "git fsck" does not check file packed-refs at all. I mean, it does not even attempt to parse it, in order to check whether at least the format makes any sense. Only "git push" does it.

What other parts of the repository does "git fsck" not check then?

The repository check is suspiciously fast. Is there a slow way to check that a repository is fine? I mean, something along the lines of checking whether every commit can be checked out without problems.

Best regards,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-20  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18  8:02 git fsck does not check the packed-refs file R. Diez
2024-01-18 11:15 ` Patrick Steinhardt
2024-01-20  1:00   ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).