pub fn resolve_real_git(
inputs: &ResolutionInputs,
) -> Result<ResolvedGit, RealGitNotFound>Expand description
What:
Select the real Git for every start:
the first PATH candidate that is real Git,
otherwise the Git the commit service’s unit records when that file passes the same checks.
Result<ResolvedGit, RealGitNotFound> is the selection with its notice,
or the typed failure.
Why:
The coordinator picked,
under the owner’s delegation and open to the owner’s veto,
that a wrapper which is found but has no real Git after it on PATH uses the Git it was set up with,
instead of stopping.
The recorded file is judged by classify_candidate as a PATH candidate is:
never this executable,
a link or copy of it,
a launcher of it,
or a script that starts it,
and it must be an executable file that exists.
A refusal keeps the stop and adds the record to the failure.
In TS you’d write (pseudocode):
function resolveRealGit(inputs: ResolutionInputs): { path: string; notice?: string }; // throws RealGitNotFound