MCPcopy Create free account
hub / github.com/diillson/chatcli / runGit

Function runGit

operator/controllers/source_controller_test.go:262–274  ·  view source on GitHub ↗

--- git-backed helpers ---

(t *testing.T, dir string, args ...string)

Source from the content-addressed store, hash-verified

260// --- git-backed helpers ---
261
262func runGit(t *testing.T, dir string, args ...string) {
263 t.Helper()
264 full := append([]string{
265 "-C", dir,
266 "-c", "user.name=test",
267 "-c", "user.email=test@example.com",
268 "-c", "protocol.file.allow=always",
269 }, args...)
270 cmd := exec.Command("git", full...)
271 if out, err := cmd.CombinedOutput(); err != nil {
272 t.Fatalf("git %v: %v\n%s", args, err, out)
273 }
274}
275
276// newLocalGitRepo creates a repo with one commit on branch main and
277// returns its path.

Callers 2

newLocalGitRepoFunction · 0.85
TestPullRepoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected