Re: git fetch --prune fails with "fatal: bad object"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 4, 2024, 17:50 UTC
- Message-ID
- <xmqqcyowwqah.fsf@gitster.g>
- In-Reply-To
- <20240604104437.GD1781455@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> These are good examples. I was going to suggest fsck, as well, just > because I knew it would keep going after seeing bogus results. But more > interesting is that it is finding things in your example that other > programs would _not_ find, because it's being more thorough than just > reading the refs.
True.
I wish for-each-ref and friends had an optional mode that lets them keep going, but since so many features in them access objects pointed at by the refs (e.g., "--format='%(objectname:short)'" and "--no-merged HEAD"), it would be very cumbersome to retrofit such a mode to the underlying machinery, I suspect.
Thanks.