libgit2/libgit2sharp

LibGit2Sharp throws an exception when discovering a git config with setting core.repositoryformatversion=1 and extensions.worktreeconfig=true

evya-dev opened this issue · 2 comments

You are opening a bug report against the LibGit2Sharp project: we
use GitHub Issues for tracking bug reports and feature requests. If
you have a question about an API or usage, please ask on StackOverflow:
http://stackoverflow.com/questions/tagged/libgit2sharp.

Otherwise, to report a bug, please fill out the reproduction steps
(below) and delete these introductory paragraphs. Thanks!

Reproduction steps

Use a downstream app such as GitVersion with a repo config with core.repositoryformatversion=1 and extensions.worktreeconfig=true.
An exception is bubbled up by libgit2sharp unsupported extension name extensions.worktreeconfig

Expected behavior

No error and a gitversion.json file is generated with the SemVer.

Actual behavior

unsupported extension name extensions.worktreeconfig

Version of LibGit2Sharp (release number or SHA1)

0.30.0

Operating system(s) tested; .NET runtime tested

Windows 11, .NET 5

The underlying exception is bubbling up from native code. The fix is to update the native libraries from 1.7.2 to >=1.8.0.

There is an existing pull request in the libgit2hsharp.nativebinaries to do just that (just needs to be reviewed and or approved by someone authorized):
libgit2/libgit2sharp.nativebinaries#155

This should be fixed in LibGit2Sharp v0.31.0 which includes libgit2 v1.8.4.