Skip to content

git 2.40.0 index.skipHash incompatible with libgit2sharp (please update libgit2 from 1.7.1 to 1.8.0) #2090

Closed
@DefaultRyan

Description

@DefaultRyan

Git added this feature in 2.40.0, and I'm increasingly encountering repos with this feature enabled that libgit2sharp is unable to process. Retrieving status throws an exception from the native libgit2 implementation that the checksums don't match.

The good news is that this issue was tracked by libgit2/libgit2#6531 and fixed in their 1.8.0 release. I've verified that the failing repositories in libgit2sharp 0.29.0 (using libgit2 1.7.1) don't exhibit this issue under libgit2 1.8.0.

Reproduction steps

Open a repository that had the git config index.skipHash set to true. Call Repository.RetrieveStatus().

Expected behavior

The call successfully returns the status.

Actual behavior

An exception is thrown "invalid data in index - calculated checksum does not match expected"

Version of LibGit2Sharp (release number or SHA1)

0.29.0

Operating system(s) tested; .NET runtime tested

Win 11, .NET 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions