git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
FLFred Long <fred_long@fastmail.fm>
Date
Jun 6, 2024, 20:12 UTC
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:
Show 6 quoted lines
>
> 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.

Previous: Jeff KingNext: Jeff King
Message 12 of 16 in “git fetch --prune fails with "fatal: bad object"”
  1. Curley JoeMay 31, 2024
  2. Junio C HamanoMay 31, 2024
  3. rsbecker@nexbridge.comMay 31, 2024
  4. Junio C HamanoJun 1, 2024
  5. Jeff KingJun 4, 2024
  6. Junio C HamanoJun 4, 2024
  7. Jeff KingJun 5, 2024
  8. Fred LongJun 4, 2024
  9. Jeff KingJun 5, 2024
  10. Fred LongJun 5, 2024
  11. Jeff KingJun 6, 2024
  12. Fred LongJun 6, 2024
  13. Jeff KingJun 8, 2024
  14. Fred LongJun 8, 2024
  15. Jeff KingJun 11, 2024
  16. Fred LongJun 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.