MCPcopy Index your code
hub / github.com/openai/codex-plugin-cc / getRepoRoot

Function getRepoRoot

plugins/codex/scripts/lib/git.mjs:89–91  ·  view source on GitHub ↗
(cwd)

Source from the content-addressed store, hash-verified

87}
88
89export function getRepoRoot(cwd) {
90 return gitChecked(cwd, ["rev-parse", "--show-toplevel"]).stdout.trim();
91}
92
93export function detectDefaultBranch(cwd) {
94 const symbolic = git(cwd, ["symbolic-ref", "refs/remotes/origin/HEAD"]);

Callers 1

collectReviewContextFunction · 0.85

Calls 1

gitCheckedFunction · 0.85

Tested by

no test coverage detected