Expand description
The one resolution of the real Git every start uses: PATH, then the Git the commit service’s unit records.
What:
The one resolution of the real Git that every start uses:
the first real Git on PATH,
otherwise the Git the commit service’s unit records,
with a notice.
Why:
The coordinator picked,
under the owner’s delegation and open to the owner’s veto
(doc/planning/cli-git-no-self-invocation.md,
section “Falling back to the Git the commit service was set up
with”),
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 search of PATH stays in real_git.rs;
this module adds the fallback after it and the types that
carry its result,
so no caller can take the path and drop the notice.
In TS you’d write (pseudocode):
const { path, notice } = resolveRealGit(inputs); // throws RealGitNotFoundStructs§
- Recorded
Git - What:
The real Git a unit file records,
with the verdict the
PATHcandidate checks gave it. Why: When the fallback is refused, the failure names the unit and the recorded file, so the person sees that the record was read and why it was not used. - Resolved
Git - What:
The real Git a resolution selected,
and the notice owed to the person when it was not found on
PATH. Why: A caller that starts Git must also print the notice, so the two travel together and a caller cannot take the path alone by accident.
Functions§
- resolve_
real_ git - What:
Select the real Git for every start:
the first
PATHcandidate 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 onPATHuses the Git it was set up with, instead of stopping. The recorded file is judged byclassify_candidateas aPATHcandidate 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.