archive mirror
 help / color / mirror / Atom feed
From: "R. Diez" <>
Subject: git fsck does not check the packed-refs file
Date: Thu, 18 Jan 2024 09:02:30 +0100	[thread overview]
Message-ID: <> (raw)

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,

             reply	other threads:[~2024-01-18  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  8:02 R. Diez [this message]
2024-01-18 11:15 ` git fsck does not check the packed-refs file Patrick Steinhardt
2024-01-20  1:00   ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).