Subject: Re: git fetch --prune fails with "fatal: bad object"

From: Junio C Hamano <[email-masked]>
Date: Tue, 04 Jun 2024 10:50:30 -0700

Jeff King <[email-masked]> writes:

> 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.