Skip to main content

convert_worktree

Function convert_worktree 

Source
pub fn convert_worktree(
    platform: &dyn Platform,
    path: &Path,
    options: ConvertOptions,
    interrupt: &Interrupt,
    say: &mut dyn FnMut(&str),
) -> Result<Verdict, MigrateError>
Expand description

What: Convert, resume, abandon or preview one worktree. Why: One function holds the phase order, so the controls exercise the real sequence; the platform and the interrupt are injected so the controls run it on any filesystem and kill it at every phase. A real run holds the conversion lock from before it reads the journal until it ends.

In TS you’d write (pseudocode):

const verdict = await convertWorktree({ platform, path, options, interrupt, say });