Repository navigation
Conversation
…t CLI Replace the LibGit2Sharp-backed test fixtures in GitVersion.Testing with a git-CLI-backed Test* fixture API (TestRepository, TestBranch, TestCommit, TestTag, TestRemote and related collections, driven by GitCliRunner). This removes the LibGit2Sharp package dependency from GitVersion.Testing entirely while keeping the RepositoryFixtureBase / EmptyRepositoryFixture / BaseGitFlowRepositoryFixture surface used by the test suites unchanged. Changes are confined to test code (GitVersion.Testing and the *.Tests projects); no product code is touched. Verification (net10.0): src and new-cli solutions build 0 warnings / 0 errors; dotnet format clean. All test suites pass in both GITVERSION_GIT_BACKEND unset and managed modes (Core.Tests 36144 tests green in both modes). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
arturcic
force-pushed
the
feature/managed-git-fixtures
branch
from
July 14, 2026 11:23
00dd0ba to
43b1209
Compare
The Phase D fixture migration runs ~3x slower on macOS/Windows runners (git-CLI spawns per write), overrunning the 30-min step timeout. Temporary bump to unblock CI; revert when the fixture speedup lands. See GitTools#5031. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Member
Author
|
Parking Phase D. Decision: keep LibGit2Sharp in |
78 of 100 tasks
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
Phase D of the LibGit2Sharp replacement (#5031): migrate
GitVersion.Testingoff LibGit2Sharp to thegitCLI. This removes the LibGit2Sharp dependency from the test-fixture layer — a prerequisite for eventually removing it from the product (Phase E, post-7.0).Closes #5038
What changed (test-only — zero product source files)
GitVersion.Testingno longer references LibGit2Sharp (no package reference, no source usage). A git-CLI-backed fixture API underGitVersion.Testing/Git/(TestRepository,TestCommit,TestBranch,TestTag,TestReference/Remote/Worktreecollections,Signature,CommitOptions,Commandsshim) replaces the LibGit2Sharp types, preserving the existing helper names/shapes so the vast majority of call sites compile unchanged.GIT_AUTHOR_*/GIT_COMMITTER_*env per invocation; hermetic isolation via-c commit.gpgsign=false -c gc.auto=0 -c core.autocrlf=falseandGIT_CONFIG_NOSYSTEM/GIT_CONFIG_GLOBAL.using LibGit2Sharp;removal, 7 had substantive edits.GitVersion.Git.Managed.Testskeeps a LibGit2Sharp reference (its parity tests legitimately compare against the libgit2 backend).Known tradeoff
Test-suite runtime increases (~3.5× on Core.Tests) because the git CLI spawns a process per write where libgit2 was in-process. Accepted for now; can be optimized later with batched history creation if it becomes a CI pain point.
Verification
src+new-clibuild 0 warnings / 0 errors;dotnet format --verify-no-changesclean.GITVERSION_GIT_BACKENDunset and=managedmodes (Core 36144, App 345, BuildAgents 91, Configuration 95, Output 123, MsBuild 151, Managed 141).🤖 Generated with Claude Code