libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

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

Open evya-dev opened this issue 1 year ago • 1 comments
trafficstars

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

evya-dev avatar Jul 09 '24 20:07 evya-dev

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): https://github.com/libgit2/libgit2sharp.nativebinaries/pull/155

evya-dev avatar Jul 09 '24 20:07 evya-dev

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

bording avatar Dec 03 '24 03:12 bording