libgit2/libgit2

git 2.40.0 index.skipHash incompatible with libgit2

ehuss opened this issue · 3 comments

ehuss commented

The recently introduced index.skipHash config setting seems to create index files that are incompatible with libgit2. This option is enabled with feature.manyFiles which some users have enabled to improve performance.

See: git/git@ffd9238

Reproduction steps

  1. With git 2.40.0, run git clone -c index.skipHash=true https://github.com/libgit2/libgit2.git
  2. Run libgit2/build/examples/lg2 status

Expected behavior

Successfully opens the repo.

Actual behavior

Fails with the error:

Could not get status [-1] - invalid data in index - calculated checksum does not match expected

Version of libgit2 (release number or SHA1)

8f8e805 or 1.6.2

Operating system(s) tested

Any

Oy. Thanks for opening the issue.

Any process?

git actually enables feature.manyFiles automatically with the version of git it's introduced in. So it can be expected that every user with a recent version git will have it set except for the very very few that follow git closely enough to know it was added, and have a specific reason to disable it.