Skip to main content

dispatch_environment

Function dispatch_environment 

Source
pub fn dispatch_environment(
    environment: &[(OsString, OsString)],
    plan: &HookDispatchPlan,
) -> Vec<(OsString, OsString)>
Expand description

What: The environment the dispatched Git sees: the caller’s variables with the plan’s three overrides. Why: The incumbent’s dispatcher restores GIT_CONFIG_PARAMETERS (or removes it), exports the worktree root and the preparation lease; nothing else changes.

In TS you’d write (pseudocode):

environment.GIT_WORK_TREE = plan.worktreeRoot; environment.CLI_GIT_PREPARATION_LEASE = plan.lease;