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

Function runGitAt

git/client_test.go:1620–1626  ·  view source on GitHub ↗
(t *testing.T, dir string, args ...string)

Source from the content-addressed store, hash-verified

1618}
1619
1620func runGitAt(t *testing.T, dir string, args ...string) string {
1621 t.Helper()
1622 cmd := exec.CommandContext(t.Context(), "git", append([]string{"-C", dir}, args...)...)
1623 output, err := cmd.CombinedOutput()
1624 require.NoErrorf(t, err, "git %s failed:\n%s", strings.Join(args, " "), output)
1625 return strings.TrimSpace(string(output))
1626}
1627
1628func TestGitCommandHelperProcess(t *testing.T) {
1629 if len(os.Args) != 7 || os.Args[3] != "git-command-helper" {

Calls 2

JoinMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected