Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2 by AArnott · Pull Request #1334 · dotnet/Nerdbank.GitVersioning (original) (raw)

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:

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.