Skip to main content

git_bin

Function git_bin 

Source
pub fn git_bin() -> String
Expand description

Resolve the git executable.

Normally git is found via PATH. In some spawned/subprocess environments (e.g. a test harness that restricts PATH) the bare "git" name fails to spawn even though git is installed. To stay robust we fall back to a set of well-known absolute locations when a PATH lookup does not produce a runnable binary. The first candidate that reports a version is used.