pub fn index_state_from_exit(exit_code: Option<i32>) -> IndexVsHeadExpand description
What:
Interpret the query’s exit status.
Option<i32> is “an exit code,
or nothing when
a signal ended the process”;
i32 is the platform’s exit-code integer type.
Why:
Only the two documented codes are answers;
everything else is “Git cannot say”.
In TS you’d write (pseudocode):
return exitCode === 0 ? 'matches' : exitCode === 1 ? 'differs' : 'unknown';