(t *testing.T, seedDir string, worktree *git.Worktree, branch testBranchSpec, message string)
| 408 | } |
| 409 | |
| 410 | func commitBranchMarker(t *testing.T, seedDir string, worktree *git.Worktree, branch testBranchSpec, message string) { |
| 411 | t.Helper() |
| 412 | |
| 413 | if err := os.WriteFile(filepath.Join(seedDir, "branch.txt"), []byte(branch.contents), 0o600); err != nil { |
| 414 | t.Fatalf("write branch marker for %s: %v", branch.name, err) |
| 415 | } |
| 416 | if _, err := worktree.Add("branch.txt"); err != nil { |
| 417 | t.Fatalf("add branch marker for %s: %v", branch.name, err) |
| 418 | } |
| 419 | if _, err := worktree.Commit(message, &git.CommitOptions{ |
| 420 | Author: &object.Signature{ |
| 421 | Name: "CLIProxyAPI", |
| 422 | Email: "cliproxy@local", |
| 423 | When: time.Unix(1711929600, 0), |
| 424 | }, |
| 425 | }); err != nil { |
| 426 | t.Fatalf("commit branch marker for %s: %v", branch.name, err) |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | func advanceRemoteBranch(t *testing.T, seedDir, remoteDir, branch, contents, message string) { |
| 431 | t.Helper() |
no outgoing calls
no test coverage detected