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

Method runGit

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

Source from the content-addressed store, hash-verified

392}
393
394func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) {
395 if p.runner != nil {
396 return p.runner.Run(ctx, p.repoDir, args...)
397 }
398 cmd := exec.CommandContext(ctx, "git", args...)
399 cmd.Dir = p.repoDir
400 out, err := cmd.CombinedOutput()
401 return string(out), err
402}

Callers 4

GetDiffMethod · 0.95
computeMergeBaseMethod · 0.95
workspaceTrackedDiffMethod · 0.95
untrackedFilesListMethod · 0.95

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected