Expand description
merge: reconciling two branches representing alternative continuations.
Merging conversation branches is fundamentally different from merging
code: two forked branches are usually alternative continuations, not
compatible edits to reconcile line-by-line. There is no automatic
content merging of divergent natural-language turns here, and this
module does not attempt to invent one. Instead, merge always creates
an explicit merge commit referencing both parents for audit/lineage,
and its materialized view is defined purely by parent order:
RecordOnly puts branch_a’s head first (so it materializes as
branch_a’s view, with branch_b linked as an alternative), and
PreferOther puts branch_b’s head first instead. Both strategies are
“no silent merging” — the untaken branch’s content never appears in the
merged view; it’s only reachable by checking it out directly.
Functions§
- merge
- Merges
branch_bintobranch_a: creates a merge commit referencing both branches’ current heads (order determined bystrategy), advancesbranch_ato point at it, and leavesbranch_buntouched. Fails if either branch doesn’t exist, or if both heads are the same commit (nothing to merge).