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

Method runGit

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

Source from the content-addressed store, hash-verified

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

Callers 5

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

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected