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

Method computeMergeBase

internal/diff/git.go:375–381  ·  view source on GitHub ↗

---- Internal helpers ----

(ctx context.Context, from, to string)

Source from the content-addressed store, hash-verified

373// ---- Internal helpers ----
374
375func (p *Provider) computeMergeBase(ctx context.Context, from, to string) string {
376 out, err := p.runGit(ctx, "merge-base", "--end-of-options", from, to)
377 if err != nil {
378 return ""
379 }
380 return strings.TrimSpace(out)
381}
382
383// RemoteIdentity returns a stable, credential-free identity string for the
384// 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