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

Re: Help with "fatal: unable to read ...." error during GC?

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 12, 2018, 09:29 UTC
Message-ID
<CACsJy8DyDpgGJ4FS=KrJpchpHpUFsfUt1zaQeoWYthAiBtSqpA@mail.gmail.com>
In-Reply-To
<20180811142341.GA17605@sigill.intra.peff.net>
On Sat, Aug 11, 2018 at 4:25 PM Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> > I do still have these warnings and no amount of git gc/git fsck/etc.
> > has reduced them in any way:
> >
> > $ git gc
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
> > warning: reflog of 'HEAD' references pruned commits
>
> I think these would go away via "reflog expire" (I'd have thought "git
> gc" would do so, though). I wonder if this is yet another tool that
> needs to be taught about worktree heads.

You would need "reflog expire --expire-unreachable=now" because the default 30 days are probably too long for this case. And yes "reflog expire --all" needs to be aware of other heads (and other per-worktree refs in general). I'm pretty sure right now it only cares about the current worktree's head.

-- 
Duy
Previous: Jeff King
Message 13 of 13 in “Help with "fatal: unable to read ...." error during GC?”
  1. Paul SmithAug 8, 2018
  2. Jeff KingAug 8, 2018
  3. Paul SmithAug 8, 2018
  4. Jeff KingAug 8, 2018
  5. Paul SmithAug 8, 2018
  6. Paul SmithAug 9, 2018
  7. Jeff KingAug 9, 2018
  8. Paul SmithAug 11, 2018
  9. Jeff KingAug 11, 2018
  10. Jeff KingAug 11, 2018
  11. Duy NguyenAug 11, 2018
  12. Jeff KingAug 11, 2018
  13. Duy NguyenAug 12, 2018

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.