Skip to main content

capture_patch

Function capture_patch 

Source
pub fn capture_patch(worktree: &Path) -> Result<String, ForemanError>
Expand description

Capture the full patch of a worktree’s changes (including untracked and binary files) so it can be replayed into a staging tree later.

Public because a fleet worker produces exactly this: a peer runs the subtask in its own worktree and returns the patch, which the orchestrator replays into the worktree it is about to gate. Same bytes, same guarantees — one function rather than a second, subtly-different capture on the far side.