MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / commitBranchMarker

Function commitBranchMarker

internal/store/gitstore_test.go:410–428  ·  view source on GitHub ↗
(t *testing.T, seedDir string, worktree *git.Worktree, branch testBranchSpec, message string)

Source from the content-addressed store, hash-verified

408}
409
410func 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
430func advanceRemoteBranch(t *testing.T, seedDir, remoteDir, branch, contents, message string) {
431 t.Helper()

Callers 3

setupGitRemoteRepositoryFunction · 0.85
advanceRemoteBranchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected