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

Method computeMergeBase

internal/diff/git.go:405–411  ·  view source on GitHub ↗

---- Internal helpers ----

(ctx context.Context, from, to string)

Source from the content-addressed store, hash-verified

403// ---- Internal helpers ----
404
405func (p *Provider) computeMergeBase(ctx context.Context, from, to string) string {
406 out, err := p.runGit(ctx, "merge-base", "--end-of-options", from, to)
407 if err != nil {
408 return ""
409 }
410 return strings.TrimSpace(out)
411}
412
413// RemoteIdentity returns a stable, credential-free identity string for the
414// repository's "origin" remote, suitable for hashing into the run manifest's

Callers 1

MergeBaseMethod · 0.95

Calls 1

runGitMethod · 0.95

Tested by

no test coverage detected