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

Method runGit

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

Source from the content-addressed store, hash-verified

731}
732
733func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) {
734 if p.runner != nil {
735 return p.runner.Run(ctx, p.repoDir, args...)
736 }
737 cmd := exec.CommandContext(ctx, "git", args...)
738 cmd.Dir = p.repoDir
739 out, err := cmd.CombinedOutput()
740 return string(out), err
741}
742
743// runGitSplit runs git with stdout and stderr kept apart, for the callers that
744// 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