altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.65k stars 86 forks source link

Linux: invalid data in index - calculated checksum does not match expected #212

Closed anselstetter closed 2 days ago

anselstetter commented 4 days ago

Thank you for a valid Magit alternative.

Unfortunately, I've encountered an issue, when running gitu under Linux.

On every repository I've tried, I got the following error:

Error: Error { code: -1, klass: 10, message: "invalid data in index - calculated checksum does not match expected" }

This is the minimal case to trigger this error:

git init && echo "test" > file && git add file

After that, I've got the error above.

I'm using git version 2.44.0 and installed gitu via:

cargo install --git https://github.com/altsem/gitu.git --locked

BTW. This error does not occur on macOS.

altsem commented 2 days ago

Ty for reporting this! I could reproduce this by opening a repo with this new config set:

git clone -c index.skipHash=true https://github.com/libgit2/libgit2.git

This support was added recently in libgit2 (which gitu uses). https://github.com/libgit2/libgit2/issues/6531

Just needs a dependency bump, I'll look into it! :)

anselstetter commented 2 days ago

That was quick. Thank you. Works like a charm now. :)