crates/but-rebase/docs/merge_commit_changes.md
This module contains the editor helpers for combining selected commit changes
into a single tree and for planning those changes as mergeable base..commit
ranges.
merge_commit_changes_to_treeEditor::merge_commit_changes_to_tree(target, subjects, merge_options) builds a
tree by:
base_tree_id -> commit^{tree} ranges into the
accumulated tree in planner-defined order, andThe target contributes its whole tree. Subject commits contribute only their selected change ranges.
plan_commit_changes_for_mergeEditor::plan_commit_changes_for_merge(target, subjects) turns a set of
selected subject commits into emitted PlannedCommitChange entries.
The planner uses a single traversal of the editor graph, rooted from the same child-most entrypoints used by commit parentage ordering. During that traversal it derives:
The planner then emits only non-pruned selected-chain tips.
Even though traversal and pruning are driven by the editor step graph, the planner still takes first-parent and tree semantics from the commit objects in the editor's in-memory repository. In other words:
base_tree_id boundary
for a surviving descendant, so a surviving tip can emit B..C even when B
is pruned.editor.rebase()?.into_editor() first.