/** * The current branch name, or null when it genuinely cannot be determined. * * Three copies of this helper existed — onboard.ts, orchestrate.ts and * post-init-orchestration.ts — each running `git rev-parse --abbrev-ref HEAD` * and each returning the literal `'main'` on failure. Two problems, and the * second is why this is not a cosmetic de-duplication: * * 1. `rev-parse --abbrev-ref HEAD` FAILS on an unborn HEAD (`git init` with no * commit), which is the state of every brand-new repo an operator runs * onboarding in. `git branch --show-current` reports the branch correctly * there — verified, not assumed. * * 2. Falling back to `'main'` invents an answer. That invented value was * written into `.project-ai/orchestration-audit.jsonl` INSIDE the entry * carrying `integrity_hash`, so a repo on `chore/enterprise-skills-init` * got a tamper-evident record attesting to `main` — while PROJECT_SCAN.yaml * beside it recorded the real branch. For a governance product, a signed log * that confidently states the wrong thing is worse than no log: `govern` * binds evidence to base…HEAD, and misattribution undermines the trail it * exists to provide. * * So: report the branch when it is known, and null when it is not. Callers * render null explicitly rather than guessing. * * An empty result means a DETACHED HEAD, which is a real state and not a * branch — also null, for the same reason. */ export declare function resolveGitBranch(cwd?: string): string | null; /** * What to record when the branch is unknown. * * A named sentinel rather than `'main'`: a reader can tell "we could not * determine this" from "this is the default branch", and no plausible branch * name collides with it. */ export declare const UNKNOWN_BRANCH = "unknown"; /** The branch for a record that must carry a string. Never invents `main`. */ export declare function gitBranchForRecord(cwd?: string): string; //# sourceMappingURL=git-branch.d.ts.map