From cdc41955c118ab8e4a58786d45ab4232258ebe54 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Sun, 26 Jan 2025 12:31:16 -0500 Subject: [PATCH] Comment forthcoming dependency changes for gix-testtools - Add a TODO comment about changing `Exponential` to `Quadratic`. This cannot be done yet, but when upgrading dependencies, it will need to be done (since the rename is a breaking change). - Replace the TODO comment about `login_shell()` with one about how to use the value of `shell()` on Windows, and modify the last component, since #1758 replaced `login_shell()` with `shell()`. `shell()` returns a path to `sh`, and gix-testtools currently needs `bash` for fixtures. But the specific approach for finding `sh.exe` relative to the Git for Windows `git-core` directory also works for `bash.exe`. --- tests/tools/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tools/src/lib.rs b/tests/tools/src/lib.rs index cb91c0b87c6..82510d627de 100644 --- a/tests/tools/src/lib.rs +++ b/tests/tools/src/lib.rs @@ -219,6 +219,7 @@ pub fn spawn_git_daemon(working_dir: impl AsRef) -> std::io::Result, S: AsRef>( } fn bash_program() -> &'static Path { - // TODO: use `gix_path::env::login_shell()` when available. if cfg!(windows) { + // TODO(deps): Once `gix_path::env::shell()` is available, maybe do `shell().parent()?.join("bash.exe")` static GIT_BASH: Lazy> = Lazy::new(|| { GIT_CORE_DIR .parent()?