pub fn which_on(path: &OsStr, tool: &str) -> Option<String>Expand description
which against an EXPLICIT path list — the seam its own test needs.
The test that pins the Windows extension order used to set_var("PATH")
around the call, which is process-global: for the length of that call
every OTHER test in the binary — 340 of them, running in parallel, many
spawning git — had a PATH containing one fake tool and nothing else. A
git spawned in that window fails with “not found”, which is not a
transient git::retrying may retry (correctly: it is a hard error), so
the caller reads it as git’s ANSWER. In gate_stamp that answer is
“nothing is stamped”. Passing the path in deletes the shared state
rather than guarding it — a lock only protects the callers who remember
to take it, and every future test here would have to remember.