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

Method computeMergeBase

internal/diff/git.go:372–378  ·  view source on GitHub ↗

---- Internal helpers ----

(ctx context.Context, from, to string)

Source from the content-addressed store, hash-verified

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