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

Method computeMergeBase

internal/diff/git.go:465–471  ·  view source on GitHub ↗

---- Internal helpers ----

(ctx context.Context, from, to string)

Source from the content-addressed store, hash-verified

463// ---- Internal helpers ----
464
465func (p *Provider) computeMergeBase(ctx context.Context, from, to string) string {
466 out, err := p.runGit(ctx, "merge-base", "--end-of-options", from, to)
467 if err != nil {
468 return ""
469 }
470 return strings.TrimSpace(out)
471}
472
473// RemoteIdentity returns a stable, credential-free identity string for the
474// 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