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

Function getCurrentBranch

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

Source from the content-addressed store, hash-verified

115}
116
117export function getCurrentBranch(cwd) {
118 return gitChecked(cwd, ["branch", "--show-current"]).stdout.trim() || "HEAD";
119}
120
121export function getWorkingTreeState(cwd) {
122 const staged = gitChecked(cwd, ["diff", "--cached", "--name-only"]).stdout.trim().split("\n").filter(Boolean);

Callers 2

collectBranchContextFunction · 0.85
collectReviewContextFunction · 0.85

Calls 1

gitCheckedFunction · 0.85

Tested by

no test coverage detected