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

Method runGit

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

Source from the content-addressed store, hash-verified

737}
738
739func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) {
740 if p.runner != nil {
741 return p.runner.Run(ctx, p.repoDir, args...)
742 }
743 cmd := exec.CommandContext(ctx, "git", args...)
744 cmd.Dir = p.repoDir
745 out, err := cmd.CombinedOutput()
746 return string(out), err
747}
748
749// runGitSplit runs git with stdout and stderr kept apart, for the callers that
750// quote the failure back to the user.

Callers 5

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

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected