Repository navigation
fix(git): managed status-calculator parity with libgit2 (symlinks, eol, global excludes) - #5058
Merged
arturcic merged 2 commits intoJul 13, 2026
Conversation
arturcic
force-pushed
the
feature/managed-git-parity-adversarial
branch
from
July 13, 2026 09:50
83d49fc to
eb1ec27
Compare
… tests Fixes the three UncommittedChanges parity bugs surfaced by corpus diffing against libgit2: - tracked symlinks: blob is the readlink target path, not the pointed-to content; do not descend through directory symlinks - .gitattributes eol/text filters: retry with CRLF-normalized content so a CRLF checkout of an LF blob counts as clean - honor global core.excludesFile / XDG git ignore for untracked files Expands DualBackendParityTests with adversarial fixtures (criss-cross, equal-timestamp, symlinks, eol). The corpus parity script itself lands separately in the pwsh version (GitTools#5056). Build 0/0; Managed.Tests 135/135; DualBackendParityTests 18/18. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rename locals that shadow the references/branches fields in ManagedRepositorySession (S1117); flatten the index-vs-working-tree comparison in GitStatusCalculator into a bool-returning helper with early returns to cut cognitive complexity (S3776). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
arturcic
force-pushed
the
feature/managed-git-parity-adversarial
branch
from
July 13, 2026 11:32
f3e5356 to
5121659
Compare
Contributor
|
Thank you @arturcic for your contribution! |
|
arturcic
added a commit
that referenced
this pull request
Jul 16, 2026
…ersarial fix(git): managed status-calculator parity with libgit2 (symlinks, eol, global excludes)
arturcic
added a commit
that referenced
this pull request
Jul 16, 2026
…ersarial fix(git): managed status-calculator parity with libgit2 (symlinks, eol, global excludes)
arturcic
added a commit
to arturcic/GitVersion
that referenced
this pull request
Jul 17, 2026
…rity-adversarial fix(git): managed status-calculator parity with libgit2 (symlinks, eol, global excludes)
arturcic
added a commit
to arturcic/GitVersion
that referenced
this pull request
Jul 17, 2026
…rity-adversarial fix(git): managed status-calculator parity with libgit2 (symlinks, eol, global excludes)
This was referenced Nov 17, 2026
This was referenced Nov 23, 2026
This was referenced Nov 30, 2026
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.



Description
Fixes the three
UncommittedChangesparity bugs in the managed backend's status calculator, surfaced by the corpus parity script (#5056) diffing managed vs libgit2 on real repositories. All version-calculation fields were already parity-clean; these were the only differences, and libgit2's behavior is the spec.Part of #5031 (Phase B correctness).
Bugs fixed (
src/GitVersion.Git.Managed/Status/GitStatusCalculator.cs)FileInfofollowed the link, so a symlink whose target is a directory or missing counted as deleted, and file-symlinks were hashed against target content. Git hashes the readlink target path as the blob for a120000entry; the untracked walk also no longer descends through directory symlinks (previously a potential escape outside the working tree). Repro: GitVersion's own.claude/skills/releasesymlink (managed reported 1 uncommitted change, libgit2 0)..gitattributeseol/text filters — a CRLF checkout of an LF blob was flagged modified on raw size/hash. Now retries with CRLF-normalized content when a check-in filter applies. Repro: GitReleaseManager'seol=crlffiles (managed reported 8, libgit2 0).core.excludesFileand the XDG default ignore (hermetic viaGIT_CONFIG_GLOBAL/XDG_CONFIG_HOME).Tests
Expands
DualBackendParityTestswith adversarial fixtures (criss-cross, equal-timestamp histories, symlinks, eol) — the in-repo dual-backend proxy for the corpus diff.Verification
dotnet build ./src/GitVersion.slnx— 0 warnings, 0 errors🤖 Generated with Claude Code