Expand description
The decision one invocation ends in: become Git, or print and exit. What: The decision one wrapper invocation ends in. Why: Forwarding replaces the process and cannot run inside a unit test; returning the decision as data lets every path be checked directly.
In TS you’d write (pseudocode):
// type Action = { kind: 'forward'; ... } | { kind: 'exit'; code: number; stdout: string; stderr: string };Enums§
- Action
- What:
What the executable must do for one invocation.
Vec<OsString>is an owned argument list;Vec<(OsString, OsString)>is an owned list of name/value pairs;Stringis owned UTF-8 text. Why: The executable performs exactly one of these: become Git, or print and exit.
Constants§
- ENGINE_
FAILURE_ EXIT_ CODE - What:
Exit code for a usage,
configuration or wrapper failure that kept Git from running.
i32is a signed 32-bit integer, the type of process exit codes. Why: The wrapper’s contract reserves 2 for these, distinct from 1 for policy findings.
Functions§
- failure
- What:
Build the stop action for a wrapper failure described in prose.
&strborrows the message; the action owns its formatted copy. Why: These failures (no real Git, a forwarding loop, an unreadable repository) print one prefixed, line-terminated diagnostic on standard error and exit 2.