Re: git gc error with git 2.37.2? (Introduced in 5a5ea141e7)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 17, 2022 at 07:10:44PM +0200, Paul Wagland wrote:

> On git-users, I started a discussion(*) about a git gc error that I was getting that started with git 2.37.2. After some followup from Mathias on that list, I have determined that the issues that I a having started with the following commit:  https://github.com/git/git/commit/5a5ea141e7 ("revision: mark blobs needed for resolve-undo as reachable", 2022-06-09)
> 
> When I compile git locally with:
>    git checkout dc8c8deaa6
>    make
>    git rev-list --objects --indexed-objects
> 
> Then it works.
> 
>    git checkout 5a5ea141e7
>    make
>    git rev-list --objects --indexed-objects
> 
> Then I get the error:
>    fatal: missing blob object ‘1d0f34d1c4314efcff527847755e4ccc77d44fb6'
> 
> How can I further diagnose how to fix this?

It sounds like there's a resolve-undo extension in your index that
references that blob, but the blob was removed from the repository
(probably by a gc prior to 5a5ea141e7, which was trying to prevent this
corruption).

I'd expect that the resolve-undo extension would eventually be dropped
once a merge is finished, but I'm not very familiar with that code. Is
the repository in question mid-merge, or does it happen all the time?

If there are no changes you need to keep in the index or working tree,
I expect that a workaround would be:

  rm -f .git/index
  git reset
  git update-index --refresh

to rewrite the index from scratch. Then the problem should not recur, as
you'd be using a version with 5a5ea141e7 from here on out.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux