From: Fred Long Date: Thu, 06 Jun 2024 20:12:31 GMT Subject: Re: git fetch --prune fails with "fatal: bad object" Message-ID: <5469592f-69eb-b1da-1218-abeae88f7303@fastmail.fm> In-Reply-To: <20240606011453.GA623737@coredump.intra.peff.net> On 6/5/2024 6:14 PM, Jeff King wrote: > > Certainly this warning is ominous: > > https://gerrit.googlesource.com/git-repo/+/refs/tags/v2.45/docs/internal-fs-layout.md#project-objects > > -Peff Yeah, I saw that, and I think I know what's causing the problem. First I create a bare mirror of AOSP with "repo init --mirror" and "repo sync", then for all my different source trees I use "repo init --reference" to share objects with the mirror using alternates files. Running "repo sync" on the bare mirror works fine. The problem occurs when I run "repo sync" in one of my source trees. Commits and refs have been deleted from the mirror, but the refs are not deleted from the repos that point to the mirror. So it all makes sense now. Still, I wish there were a simple command I could run to remove the dangling refs.