Skip to main content

recover_for_command

Function recover_for_command 

Source
pub fn recover_for_command(
    context: &GitContext,
    identity: &WorktreeIdentity,
) -> Gate
Expand description

What: The startup step for the invocation’s worktree, and how the command may go on. Why: Shared by wrapped commands, read-only commands and direct commands. A recovery failure stops the command with exit 2, as the incumbent’s content-unavailable engine failure does; the note about an earlier release’s records goes to standard error and does not stop it.

In TS you’d write (pseudocode):

async function recoverForCommand({ gitPath, identity }): Promise<Gate>;