Skip to content

Commit e5d72b1

Browse files
committed
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`.
1 parent 5b33ded commit e5d72b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/tools/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ pub fn spawn_git_daemon(working_dir: impl AsRef<Path>) -> std::io::Result<GitDae
219219
.spawn()?;
220220

221221
let server_addr = addr_at(free_port);
222+
// TODO(deps): Upgrading dependencies will require changing `Exponential` to `Quadratic`.
222223
for time in gix_lock::backoff::Exponential::default_with_random() {
223224
std::thread::sleep(time);
224225
if std::net::TcpStream::connect(server_addr).is_ok() {
@@ -652,8 +653,8 @@ fn configure_command<'a, I: IntoIterator<Item = S>, S: AsRef<OsStr>>(
652653
}
653654

654655
fn bash_program() -> &'static Path {
655-
// TODO: use `gix_path::env::login_shell()` when available.
656656
if cfg!(windows) {
657+
// TODO(deps): Once `gix_path::env::shell()` is available, maybe do `shell().parent()?.join("bash.exe")`
657658
static GIT_BASH: Lazy<Option<PathBuf>> = Lazy::new(|| {
658659
GIT_CORE_DIR
659660
.parent()?

0 commit comments

Comments
 (0)