Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2#1334
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes case-insensitive version file lookup when a repo-relative path’s casing doesn’t match what Git recorded, with special attention to git worktrees and bringing LibGit2 behavior in line with the managed engine.
Changes:
- Updated the case-insensitive path matching test to require the behavior for both Managed and LibGit2 engines.
- Managed engine:
core.ignorecasedetection now checks bothCommonDirectory/configandGitDirectory/configto better support worktrees. - LibGit2 engine: normalizes the repo-relative project directory path to the commit tree’s actual casing when
core.ignorecaseis enabled.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/Nerdbank.GitVersioning.Tests/VersionFileTests.cs | Strengthens the case-insensitive path test to apply to both engines. |
| src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs | Improves core.ignorecase config discovery for worktree scenarios by checking common + worktree git dirs. |
| src/NerdBank.GitVersioning/LibGit2/LibGit2VersionFile.cs | Adds tree-based case-insensitive path normalization when core.ignorecase is true. |
…mplement for libgit2
35118ef to
e6198dc
Compare
This was referenced Jun 19, 2026
Closed
This was referenced Jul 6, 2026
Open
Open
AngeloDotNet
added a commit
to AngeloDotNet/TinyDatabaseLocalization
that referenced
this pull request
Jul 9, 2026
Updated [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.9.50 to 3.10.91. <details> <summary>Release notes</summary> _Sourced from [Nerdbank.GitVersioning's releases](https://github.com/dotnet/Nerdbank.GitVersioning/releases)._ ## 3.10.91 ## What's Changed * Retry file operations on access denied errors by @AArnott in dotnet/Nerdbank.GitVersioning#1408 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.85...v3.10.91 ## 3.10.85 ## What's Changed * Avoid writing server.json multiple times in a single pack by @AArnott in dotnet/Nerdbank.GitVersioning#1391 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.70...v3.10.85 ## 3.10.70 ## What's Changed ### Fixes * Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2 by @AArnott in dotnet/Nerdbank.GitVersioning#1334 * Fix native heap corruption in GitPackIndexMappedReaderTests by @AArnott in dotnet/Nerdbank.GitVersioning#1360 ### Enhancements * Add prerelease property to inheriting version.json files by @Copilot in dotnet/Nerdbank.GitVersioning#1317 * Add NBGV_SetCloudBuildVersionVars property to disable cloud build variable output by @Copilot in dotnet/Nerdbank.GitVersioning#1324 * Add --what-if option to prepare-release command for simulating version changes by @Copilot in dotnet/Nerdbank.GitVersioning#1242 * Build nbgv CLI tool for .NET 9 and 10 by @AArnott in dotnet/Nerdbank.GitVersioning#1369 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.70 ## 3.10.44-alpha ## What's Changed ### Fixes * Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2 by @AArnott in dotnet/Nerdbank.GitVersioning#1334 ### Enhancements * Add --what-if option to prepare-release command for simulating version changes by @Copilot in dotnet/Nerdbank.GitVersioning#1242 * Add NBGV_SetCloudBuildVersionVars property to disable cloud build variable output by @Copilot in dotnet/Nerdbank.GitVersioning#1324 ### Dependency updates * chore(deps): update dependency microsoft.build.locator to 1.11.2 by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1304 * chore(deps): update dotnet monorepo by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1309 * Update dotnet monorepo by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1338 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.8-alpha...v3.10.44-alpha ## 3.10.8-alpha ## What's Changed * Add prerelease property to inheriting version.json files by @Copilot in dotnet/Nerdbank.GitVersioning#1317 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.8-alpha Commits viewable in [compare view](dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.91). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
This was referenced Jul 9, 2026
Bump Microsoft.NET.Test.Sdk, Nerdbank.GitVersioning and YamlDotNet
bricelam/Bricelam.PowerFx.Linq#36
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.