libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

sha256 not yet supported

Open embix opened this issue 6 months ago • 0 comments

When running new Repository(dir) on a sha256 enabled repo, it fails with a LibGit2SharpException stating unknown object format 'sha256'.

see: https://git-scm.com/docs/hash-function-transition

   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
   at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter) in /_/LibGit2Sharp/Repository.cs:line 35

At first glance it looks like libgit2 doesn't support this yet.

Version used: LibGit2Sharp 0.31.0, using LibGit2Sharp.NativeBinaries 2.0.323

To be fair: we only have one repo using sha256 for compatibility testing - and while git cli works great, 3rd-party tooling is still abysmal.

embix avatar May 27 '25 12:05 embix