Re: git fetch --prune fails with "fatal: bad object"
- From
Jeff King <peff@peff.net>
- Date
- Jun 5, 2024, 08:47 UTC
- Message-ID
- <20240605084718.GD2345232@coredump.intra.peff.net>
- In-Reply-To
- <876fbb07-210e-128e-5289-57ab01761750@fastmail.fm>
On Tue, Jun 04, 2024 at 01:09:10PM -0700, Fred Long wrote:
Show 11 quoted lines
> On 6/4/2024 3:44 AM, Jeff King peff-at-peff.net |git bugs/Example Allow| > wrote: > > In the case of a refs/remotes entry where you happen to know that you > > could re-clone from the other side, it is relatively low stakes. But I > > think keeping a human brain in the loop between corruption and deletion > > is a good thing. Corruption should not be happening so often that it's a > > major pain point. > In my case it's not corruption. It's people creating branches, deleting > them, and then removing the commits. (Maybe our git server has an option to > automatically prune commits that are not reachable from a branch or tag, I > don't know.) But this happens very frequently at my work.
Your local refs should not point to missing objects, though. Each clone should maintain its own consistency. Are you using "git clone --shared" or another scheme involving alternates?
-Peff