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

Method runGit

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

Source from the content-addressed store, hash-verified

338}
339
340func (p *Provider) runGit(ctx context.Context, args ...string) (string, error) {
341 if p.runner != nil {
342 return p.runner.Run(ctx, p.repoDir, args...)
343 }
344 cmd := exec.CommandContext(ctx, "git", args...)
345 cmd.Dir = p.repoDir
346 out, err := cmd.CombinedOutput()
347 return string(out), err
348}

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