Repository navigation
Test git transports with local remotes - #14350
Merged
BagToad merged 1 commit intoOct 30, 2026
Merged
Conversation
2 of 6 tasks
williammartin
force-pushed
the
williammartin-git-transport-tests
branch
from
October 29, 2026 10:24
ff5afe5 to
4210ec6
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the Git transport test refactor.
No open issues 🎉
What changed in this PR
This test-only refactor extends the real-repository testing introduced in #14348 and #14349 to Git transport operations. It replaces broad subprocess mocks with temporary local repositories without changing production behavior.
Changes:
- Exercise fetch, pull, push, clone, and remote configuration through real Git operations and assert repository state and failure behavior.
- Retain focused command-construction tests for credential scope, fast-forward-only pulls, and upstream-setting pushes.
- Extend the shared test harness with bare repositories, commits, and portable file URLs.
| File | Description |
|---|---|
git/client_test.go |
Converts transport tests to local Git repositories and extends the shared repository helpers. |
Review effort: Balanced
williammartin
force-pushed
the
williammartin-git-transport-tests
branch
from
October 29, 2026 11:44
d58053f to
787e5ad
Compare
2 of 6 tasks
williammartin
force-pushed
the
williammartin-git-transport-tests
branch
from
October 29, 2026 19:21
787e5ad to
0a2e9b4
Compare
Co-authored-by: Copilot App <[email protected]>
williammartin
force-pushed
the
williammartin-git-transport-tests
branch
from
October 29, 2026 20:36
d2995ff to
2720566
Compare
williammartin
marked this pull request as ready for review
October 29, 2026 20:44
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 #14349
The transport tests simulate successful commands without transferring any commits, so they cannot check the resulting refs or tracking configuration.
This PR replaces those simulations with real operations between temporary working and bare repositories. It also checks that command failures preserve partial output, the exit status and the diagnostic.
How did you test this change?
Not tested manually. The changed scenarios exercise local Git transports without using GitHub or another network service.
Key points
Transport tests use local paths and
file://URLs, so they transfer real commits without contacting GitHub or depending on network access.Credential-helper configuration is still checked by inspecting command arguments. Local remotes do not require authentication, so a successful local transfer would not prove those arguments are correct.
Notes for reviewers
Start with the transport scenarios, then read the command failure scenario.
This builds on #14349. #14351 reduces duplication in these tests.
Authorship and follow-up
Who wrote this:
Who answers review comments: