tummychow / git-absorb

git commit --fixup, but automatic
https://crates.io/crates/git-absorb
BSD 3-Clause "New" or "Revised" License
3.35k stars 59 forks source link

invalid data in index - calculated checksum does not match expected #81

Open tummychow opened 1 year ago

tummychow commented 1 year ago
$ git absorb -v
Apr 06 16:57:27.710 CRIT absorb failed, err: invalid data in index - calculated checksum does not match expected; class=Index (10), line: 117, module: git_absorb

just in case anyone runs into this, it's an upstream issue https://github.com/libgit2/libgit2/issues/6531

workaround is to disable the offending option git config --local index.skipHash false. then you have to clear your index and restage all your changes so that the index gets built with the option disabled.

zenspider commented 1 year ago

I got hit by this. It was from git config feature.manyFiles being set to true, which sets index.skipHash to true as well. I wound up keeping feature.manyFiles and setting index.skipHash to false. It feels a tad more sluggish, but at least I can run git absorb now.

halostatue commented 6 months ago

This has been fixed in https://github.com/libgit2/libgit2/pull/6738, so it should be in the next release of libgit2 (1.7.3 or later).