Title: Update bundled libgit2 to >= 1.9.4 for relativeWorktrees support · Issue #2184 · libgit2/libgit2sharp · GitHub
Open Graph Title: Update bundled libgit2 to >= 1.9.4 for relativeWorktrees support · Issue #2184 · libgit2/libgit2sharp
X Title: Update bundled libgit2 to >= 1.9.4 for relativeWorktrees support · Issue #2184 · libgit2/libgit2sharp
Description: Reproduction steps Use LibGit2Sharp to open a repository/worktree created by Git with relative worktree paths enabled. Modern Git can set this automatically when a worktree is created or repaired with relative paths. A minimal repository...
Open Graph Description: Reproduction steps Use LibGit2Sharp to open a repository/worktree created by Git with relative worktree paths enabled. Modern Git can set this automatically when a worktree is created or repaired w...
X Description: Reproduction steps Use LibGit2Sharp to open a repository/worktree created by Git with relative worktree paths enabled. Modern Git can set this automatically when a worktree is created or repaired w...
Opengraph URL: https://github.com/libgit2/libgit2sharp/issues/2184
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update bundled libgit2 to >= 1.9.4 for relativeWorktrees support","articleBody":"### Reproduction steps\n\nUse LibGit2Sharp to open a repository/worktree created by Git with relative worktree paths enabled. Modern Git can set this automatically when a worktree is created or repaired with relative paths.\n\nA minimal repository state has `core.repositoryformatversion = 1` and the newer Git extension:\n\n```ini\n[extensions]\n relativeWorktrees = true\n```\n\nA linked worktree may have a `.git` file like:\n\n```text\ngitdir: ../worktrees/my-worktree\n```\n\nThen open the worktree with LibGit2Sharp:\n\n```csharp\nusing LibGit2Sharp;\n\nusing var repo = new Repository(\"/path/to/my-worktree\");\n```\n\nThis also reproduces through downstream tools that depend on LibGit2Sharp. In my case, GitVersion.MsBuild 6.7.0 launches its bundled GitVersion tool, which bundles LibGit2Sharp 0.31.0 and native libgit2 1.8.4, and fails while opening the repository.\n\n### Expected behavior\n\nLibGit2Sharp should open repositories/worktrees that use Git's `extensions.relativeWorktrees` extension.\n\nThe upstream libgit2 issue was fixed here:\n\n- https://github.com/libgit2/libgit2/issues/7210\n- https://github.com/libgit2/libgit2/pull/7254\n\nThe fix is included in libgit2 v1.9.4:\n\n- https://github.com/libgit2/libgit2/releases/tag/v1.9.4\n\n### Actual behavior\n\nOpening the repository fails before any repository operations can run:\n\n```text\nLibGit2Sharp.LibGit2SharpException: unsupported extension name extensions.relativeworktrees\n at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)\n at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result)\n at LibGit2Sharp.Core.Proxy.git_repository_open(String path)\n at LibGit2Sharp.Repository..ctor(String path, RepositoryOptions options, RepositoryRequiredParameter requiredParameter)\n at LibGit2Sharp.Repository..ctor(String path)\n```\n\n### Version of LibGit2Sharp (release number or SHA1)\n\nObserved via downstream GitVersion.MsBuild 6.7.0, which bundles:\n\n```text\nLibGit2Sharp 0.31.0\nnative libgit2 1.8.4\n```\n\nThe requested dependency update is for a LibGit2Sharp release that bundles native libgit2 >= 1.9.4.\n\n### Operating system(s) tested; .NET runtime tested\n\nTested on Linux / WSL2 with .NET 8.0.\n\nGit version in the environment:\n\n```text\ngit version 2.51.2\n```\n\n### Downstream dependency-chain impact\n\nThis blocks tools that consume LibGit2Sharp indirectly, notably GitVersion. I am filing a corresponding GitVersion issue as well, because GitVersion cannot fix this until LibGit2Sharp publishes a release with libgit2 >= 1.9.4.\n","author":{"url":"https://github.com/HackXIt","@type":"Person","name":"HackXIt"},"datePublished":"2026-06-09T14:31:25Z","url":"https://github.com/libgit2/libgit2sharp/issues/2184"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:23a9e329-5b77-3fed-ef09-7065739f6a89 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E96C:25F138:1957D0:225309:6AFD4F45 |
| html-safe-nonce | 6ec95f149fc541372cc89920837bfe54af8ea898fa53a18c34619d48f3707680 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTZDOjI1RjEzODoxOTU3RDA6MjI1MzA5OjZBRkQ0RjQ1IiwidmlzaXRvcl9pZCI6IjIzODU2OTQ4NDExMTI0NDg4MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 24aea8ac7bbc5b77a3b5c0fd00f245db7566ba62bccd314617631c156aed1329 |
| hovercard-subject-tag | issue:4622891801 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2sharp/2184/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c9d5c1e682c41a58214ce89adfc47cb84ed56628ea8572879359cf79b8869d50/libgit2/libgit2sharp/issues/2184 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c9d5c1e682c41a58214ce89adfc47cb84ed56628ea8572879359cf79b8869d50/libgit2/libgit2sharp/issues/2184 |
| og:image:alt | Reproduction steps Use LibGit2Sharp to open a repository/worktree created by Git with relative worktree paths enabled. Modern Git can set this automatically when a worktree is created or repaired w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | HackXIt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/libgit2/libgit2sharp git https://github.com/libgit2/libgit2sharp.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 1415168 |
| octolytics-dimension-repository_nwo | libgit2/libgit2sharp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1415168 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2sharp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width