From: Stefan Monnier <monnier@iro.umontreal.ca>
To: git@vger.kernel.org
Subject: `git gc` says "unable to read" but `git fsck` happy
Date: Wed, 29 Mar 2023 18:05:24 -0400 [thread overview]
Message-ID: <jwvfs9nusjm.fsf-monnier+Inbox@gnu.org> (raw)
Here's an example session:
% LANG=C git fsck --strict; LANG=C git gc
Checking object directories: 100% (256/256), done.
error in tree 2699d230e3b592ae42506d7b5c969a7ac6a4593c: zeroPaddedFilemode: contains zero-padded file modes
Checking objects: 100% (462555/462555), done.
Verifying commits in commit graph: 100% (117904/117904), done.
Enumerating objects: 462573, done.
Counting objects: 100% (462573/462573), done.
Delta compression using up to 8 threads
Compressing objects: 100% (155363/155363), done.
fatal: unable to read f5e44b38fc8f7e15e5e6718090d05b09912254fa
fatal: failed to run repack
%
How come it can't read `f5e44b38fc8f7e15e5e6718090d05b09912254fa` during
"repack" while `git fsck` says everything is fine?
More importantly: how do I diagnose this further and fix it?
Rumors on the net suggest that `git gc --aggressive` may circumvent this
problem occasionally, but those don't seem to know what they're talking
about, and in my case it didn't make any difference (except that it
takes more time :-).
Stefan
next reply other threads:[~2023-03-29 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 22:05 Stefan Monnier [this message]
2023-03-29 23:37 ` `git gc` says "unable to read" but `git fsck` happy Jeff King
2023-03-30 13:01 ` Stefan Monnier
2023-03-30 18:17 ` Jeff King
2023-06-01 12:04 ` Andreas Schwab
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvfs9nusjm.fsf-monnier+Inbox@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 read-only IMAP folder(s) and NNTP newsgroup(s).