Skip to main content

rebase_hunks

Function rebase_hunks 

Source
pub fn rebase_hunks(hunks: &mut [Hunk], base_text: &str, current_text: &str)
Expand description

Carry hunks authored against base_text onto current_text.

The agent’s base is not necessarily a revision we hold, so rather than replaying undo history we synthesise the intervening change by diffing base against current. The result is an ordinary ChangeSet, which means ADR-0006 §4’s overlap rules apply unchanged — including that a hunk the human edited inside is conflicted rather than silently applied over their work.