git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git fsck does not check the packed-refs file

From
RDR. Diez <rdiez-temp3@rd10.de>
Date
Jan 18, 2024, 08:02 UTC
Message-ID
<6cfee0e4-3285-4f18-91ff-d097da9de737@rd10.de>
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,
   rdiez
Next: Patrick Steinhardt
Message 1 of 3 in “git fsck does not check the packed-refs file”
  1. R. DiezJan 18, 2024
  2. Patrick SteinhardtJan 18, 2024
  3. Jeff KingJan 20, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.