Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2#1334

Merged
AArnott merged 1 commit into
mainfrom
better-case-insensitivity
Apr 3, 2026
Merged

Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2#1334
AArnott merged 1 commit into
mainfrom
better-case-insensitivity

Conversation

@AArnott

@AArnott AArnott commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@AArnott AArnott added this to the v3.10 milestone Apr 3, 2026
@AArnott AArnott requested a review from Copilot April 3, 2026 21:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ignorecase detection now checks both CommonDirectory/config and GitDirectory/config to better support worktrees.
  • LibGit2 engine: normalizes the repo-relative project directory path to the commit tree’s actual casing when core.ignorecase is 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.

Comment thread src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs
@AArnott AArnott force-pushed the better-case-insensitivity branch from 35118ef to e6198dc Compare April 3, 2026 21:53
@AArnott AArnott enabled auto-merge April 3, 2026 21:54
@AArnott AArnott added this pull request to the merge queue Apr 3, 2026
Merged via the queue into main with commit fd4de96 Apr 3, 2026
11 of 12 checks passed
@AArnott AArnott deleted the better-case-insensitivity branch April 3, 2026 22:39
This was referenced Jun 19, 2026
This was referenced Jul 6, 2026
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>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Nerdbank.GitVersioning&package-manager=nuget&previous-version=3.9.50&new-version=3.10.91)](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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants