MCPcopy Create free account
hub / github.com/cli/cli / gitForTest

Function gitForTest

script/ghmock/gitcmd_test.go:367–373  ·  view source on GitHub ↗
(t *testing.T, args ...string)

Source from the content-addressed store, hash-verified

365}
366
367func gitForTest(t *testing.T, args ...string) string {
368 t.Helper()
369 var out, diagnostic bytes.Buffer
370 err := cmdGit(args, &out, &diagnostic)
371 require.NoError(t, err, "ghmock git %s\n%s", strings.Join(args, " "), diagnostic.String())
372 return out.String()
373}
374
375func prepareGitRepo(t *testing.T, remote string) {
376 t.Helper()

Callers 4

TestCmdGitFunction · 0.85
prepareGitRepoFunction · 0.85
TestCmdExportFunction · 0.85
TestRunAllFunction · 0.85

Calls 4

cmdGitFunction · 0.85
JoinMethod · 0.80
HelperMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected