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