Repository navigation
Conversation
williammartin
force-pushed
the
williammartin-git-graph-tests
branch
from
September 4, 2026 15:17
4e10fe3 to
091f872
Compare
2 of 6 tasks
williammartin
force-pushed
the
williammartin-git-graph-tests
branch
from
October 29, 2026 10:24
d8cd13b to
55a5841
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The unsupported cherry-pick --quiet option causes the test to fail before its assertions, and the branch-deletion test no longer verifies forced deletion of an unmerged branch.
2 open issues
What changed in this PR
Builds on the repository harness from #14348 to replace more Git client subprocess mocks with real local repositories. The changes focus on testing repository behavior without altering production code.
Changes:
- Converts graph, ref, configuration, branch, tag, checkout, path, and worktree tests to repository-state and error assertions.
- Adds scenarios for divergent history, signed commits, and worktree lifecycle operations while retaining malformed-output fixtures.
- Resolves temporary-directory symlinks for consistent path comparisons.
| File | Description |
|---|---|
git/client_test.go |
Replaces mock-based tests with local repository scenarios and normalizes harness paths. |
Review effort: Balanced
williammartin
force-pushed
the
williammartin-git-graph-tests
branch
from
October 29, 2026 11:37
55a5841 to
96735a4
Compare
2 of 6 tasks
williammartin
force-pushed
the
williammartin-git-graph-tests
branch
from
October 29, 2026 19:18
96735a4 to
31e5c85
Compare
Co-authored-by: Copilot App <[email protected]>
williammartin
force-pushed
the
williammartin-git-graph-tests
branch
from
October 29, 2026 20:33
91c9056 to
ebb46da
Compare
williammartin
marked this pull request as ready for review
October 29, 2026 20:44
2 of 6 tasks
BagToad
approved these changes
Oct 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
Follow on from #14348
The graph, branch configuration and worktree tests still supply Git output through helper-process scripts. That checks the expected command, but not whether the operation produces the intended repository state.
This PR replaces those scripts with local repository scenarios using the shared harness. The assertions cover commit selection, push destinations, branch and tag operations, repository paths and worktree state.
How did you test this change?
Not tested manually. This changes automated scenarios without changing production code.
Key points
The repository scenarios use real Git, but tests for malformed output still supply their own input. Those error cases cannot be reliably produced by creating a normal repository.
Notes for reviewers
Start with commit selection, push resolution and unmerged-branch deletion, then read the configuration and worktree conversions.
This builds on the harness in #14348. The local transport scenarios follow in #14350.
Authorship and follow-up
Who wrote this:
Who answers review comments: