Skip to main content

is_fallback_checkout

Function is_fallback_checkout 

Source
pub fn is_fallback_checkout(arguments: &[OsString]) -> bool
Expand description

What: Whether the arguments are the wrapper’s own checkout of a new worktree after a snapshot or clone attempt failed: reset --hard as the subcommand. Why: That run is the checkout the person’s git worktree add would have made, so it takes the same option; every other step of the ladder is a bookkeeping or difference step and stays as it is.

In TS you’d write (pseudocode):

subcommand(args) === 'reset' && args.includes('--hard')