/** The AVCS scope a working tree writes into. Empty ⇒ the base view (no tag at all). */ export type BranchScope = { line?: string; workspace?: string; }; /** * Map a git branch to an AVCS scope (docs/20 §3.2). A topic branch is work that intends to * CONVERGE, so it becomes a workspace; a line is permanent divergence and is only ever * chosen deliberately. * * explicit `--line` → { line } a human asking to diverge * detached HEAD / no git → { } the base view, untagged * a branch with a line ref → { line } pre-existing work keeps its history (W9) * trunk → { } the base view, untagged * anything else → { workspace } a converging topic branch * * `hasExistingLine` is the caller's answer to "is there already a `line:` ref?". * Remapping such a branch to a workspace would leave its captured history unreachable from * the view it has been accumulating in, so the old mapping wins for as long as it exists. * It is checked BEFORE trunk on purpose: in a repository from before `trunk` existed, a trunk * named anything but main/master had itself become a line, and its accumulated work lives in * that line's view — sending new captures to the default view would split the history in two. */ export declare function scopeForBranch(branch: string | null | undefined, trunks: Iterable, opts?: { explicitLine?: string; hasExistingLine?: boolean; }): BranchScope; /** * The single branch a completed git merge brought in, read off git's own reflog subject, or * `null` when it cannot be read off unambiguously (docs/20 §3.4). * * `post-merge` receives no arguments and runs after `MERGE_HEAD` is gone, so the reflog is * the only record of what was merged. Landing is append-only and irreversible, so anything * short of one unmistakable branch name returns null and the caller must land NOTHING * (docs/20 R1): an octopus merge names several, a squash merge (R2) names none at all. */ export declare function mergedBranchFromReflog(subject: string | null | undefined): string | null; //# sourceMappingURL=scope.d.ts.map