Skip to content

Test git transports with local remotes - #14350

Draft
williammartin wants to merge 1 commit into
williammartin-git-graph-testsfrom
williammartin-git-transport-tests
Draft

williammartin wants to merge 1 commit into
williammartin-git-graph-testsfrom
williammartin-git-transport-tests

Conversation

@williammartin

Copy link
Copy Markdown
Member

Description

The git.Client transport tests simulated Git subprocesses and primarily asserted broad command strings. This replaces those simulations with real Git operations against temporary local working and bare repositories, so the tests protect repository state, refs, remotes, branch relationships, clone targets, and semantic failures without contacting the network.

This is a test-only refactor. Deeper suite consolidation remains for the next stack layer.

How did you test this change?

I exercised every rewritten scenario with the system Git executable against temporary local repositories. I observed fetch and pull update the intended refs, push create both the remote branch and local upstream, clone create working and bare targets, remote configuration persist the requested URLs and refspecs, and invalid operations return Git failures without changing protected state.

Key points

  • Local file:// and filesystem remotes keep transport execution hermetic and avoid credential prompts.
  • Narrow command-construction tests remain only for credential scope, pull --ff-only, and push upstream-setting contracts.
  • The existing testRepo harness is extended for bare repositories, commits, and portable file URLs instead of introducing a second harness.

Notes for reviewers

Start with the Fetch/Pull/Push/Clone scenarios in git/client_test.go, then review the small testRepo extensions near the bottom of the file.

This is layer 3 above draft PR #14349; draft PR #14348 is the bottom of the stack.

Authorship and follow-up

Who wrote this:

  • A human wrote it.
  • An agent wrote it under close human direction.
  • An agent wrote it independently, and no human has guided the implementation beyond the initial prompt.

Who answers review comments:

  • @williammartin will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted.
  • Nobody has explicitly committed to replying.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@williammartin williammartin mentioned this pull request Sep 4, 2026
2 of 6 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant