History

Revise `find_git_associated_windows_executable` future directions

It didn't mention how expanded use may require directories like `mingw64/bin` to be added to searched locations, and also was somewhat hard to read. This adds that and rephrases.

Eliah Kagan committed 1 year ago

Commit 56dc3cc1 parent 17b5c311 file · +4 −4Browse files

Unified · Split

gix-path/src/env/auxiliary.rs+4−4
@@ -71,10 +71,10 @@ const BIN_DIR_FRAGMENTS: &[&str] = &["bin", "usr/bin"]; · 70 unmodified lines
71/// does, which is the case unless it is overridden by setting `GIT_EXEC_PATH` to an unusual value.71/// does, which is the case unless it is overridden by setting `GIT_EXEC_PATH` to an unusual value.
72///72///
73/// This is currently only used (and only exercised in tests) for finding `sh.exe`. It may be used73/// This is currently only used (and only exercised in tests) for finding `sh.exe`. It may be used
74/// to find other executables in the future, but may require adjustment. (In particular, depending74/// to find other executables in the future, but may require adjustment. In particular, depending
75/// on the desired semantics, it should possibly also check inside a `cmd` directory, possibly also75/// on the desired semantics, it should possibly also check inside a `cmd` directory; directories
76/// check inside `super::core_dir()` itself, and could safely check the latter location even if its76/// like `<platform>/bin`, for any applicable variants (such as `mingw64`); and `super::core_dir()`
77/// value is not suitable to use in inferring any other paths.)77/// itself, which it could safely check even if its value is not safe for inferring other paths.
78fn find_git_associated_windows_executable(stem: &str) -> Option<OsString> {78fn find_git_associated_windows_executable(stem: &str) -> Option<OsString> {
79 let git_root = git_for_windows_root()?;79 let git_root = git_for_windows_root()?;
80 80