MCPcopy
hub / github.com/openai/codex-plugin-cc / buildBranchComparison

Function buildBranchComparison

plugins/codex/scripts/lib/git.mjs:68–75  ·  view source on GitHub ↗
(cwd, baseRef)

Source from the content-addressed store, hash-verified

66}
67
68function buildBranchComparison(cwd, baseRef) {
69 const mergeBase = gitChecked(cwd, ["merge-base", "HEAD", baseRef]).stdout.trim();
70 return {
71 mergeBase,
72 commitRange: `${mergeBase}..HEAD`,
73 reviewRange: `${baseRef}...HEAD`
74 };
75}
76
77export function ensureGitRepository(cwd) {
78 const result = git(cwd, ["rev-parse", "--show-toplevel"]);

Callers 2

collectBranchContextFunction · 0.85
collectReviewContextFunction · 0.85

Calls 1

gitCheckedFunction · 0.85

Tested by

no test coverage detected