refactor(vcs): back GitRepository with LibGit2Sharp#367
Closed
ChrisonSimtian wants to merge 1 commit into
Closed
Conversation
- Replace hand-rolled .git/config, HEAD and packed-refs parsing in FromLocalDirectory with LibGit2Sharp introspection - Replace the remote-URL regex with Uri-based parsing plus a small SCP-like (git@host:path) fallback - Public GitRepository surface is unchanged (internal swap only) - Add SSH/HTTPS/UNC remote URL test cases Closes #352 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
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.
What
.git/config,HEADandpacked-refsparsing inGitRepository.FromLocalDirectorywith LibGit2Sharp introspection (head, commit, branch, tags, tracked remote/branch, remote URL).Uri-based parsing, plus a small SCP-like (git@host:path) fallback for the syntaxUricannot represent.LibGit2Sharp0.31.0 toDirectory.Packages.propsand reference it fromFallout.Build.Why
GitRepositorysurface is unchanged. This is an internal swap, non-breaking, targeting the 2026 line.Tests
GitRepositoryTestgreen: 26 passed (was 22), added SSH-with-port, HTTP,file://and UNC (\server\share\repo.git) remote cases.dotnet build fallout.slnxsucceeds, 0 errors.Note on base branch
The task asked to base this on
spike/shim-migration-redesign. This worktree was actually forked frommain(b4866d92), which still uses thesrc/Fallout.Build/layout, whereasspike/shim-migration-redesignhas already renamed the project tosrc/Fallout.Application/(onion re-layout). Basing against the spike branch would produce a huge spurious diff and land the edit on a path that no longer exists there, so this PR targetsmainwhere the change applies cleanly. Re-target if the spike branch is the intended integration point.Closes #352