Skip to main content

plan_invocation

Function plan_invocation 

Source
pub fn plan_invocation(
    arguments: &[OsString],
    environment: &[(OsString, OsString)],
    inputs: &ResolutionInputs,
) -> Action
Expand description

What: Decide the action for one invocation from injected process facts. &[OsString] borrows the arguments after the program name; &[(OsString, OsString)] borrows the environment as name/value pairs. Why: Order matters. The recursion check runs before anything else. Wrapper controls written before the subcommand are removed first, because Git’s own reading of the arguments stops at them and would hide the subcommand from every later decision. The management namespace is answered by the wrapper. Every other command goes through the wrapped-command lifecycle with real Git behind it.

In TS you’d write (pseudocode):

function planInvocation(args: string[], environment: [string, string][], inputs: ResolutionInputs): Action;