MCPcopy Create free account
hub / github.com/alibaba/open-code-review / runGit

Method runGit

internal/diff/git.go:644–652  ·  view source on GitHub ↗
(ctx context.Context, args ...string)

Source from the content-addressed store, hash-verified

642}
643
644func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) {
645 if p.runner != nil {
646 return p.runner.Run(ctx, p.repoDir, args...)
647 }
648 cmd := exec.CommandContext(ctx, "git", args...)
649 cmd.Dir = p.repoDir
650 out, err := cmd.CombinedOutput()
651 return string(out), err
652}
653
654// runGitSplit runs git with stdout and stderr kept apart, for the callers that
655// quote the failure back to the user.

Callers 4

computeMergeBaseMethod · 0.95
RemoteIdentityMethod · 0.95
resolveCommitMethod · 0.95
commitParentsMethod · 0.95

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected