git: no console window per probe on Windows

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tobi Lütke
2026-09-25 16:17:59 +00:00
co-authored by Claude Opus 5.5
parent 13fd9ee158
commit a95dce783b
+9 -1
View File
@@ -157,7 +157,15 @@ fn run(path: &Path, args: &[&str]) -> Option<String> {
}
fn git(path: &Path, args: &[&str]) -> Option<std::process::Output> {
Command::new("git")
let mut command = Command::new("git");
// disktree is a GUI program on Windows, with no console to lend: without
// this, every probe flashes a console window of its own.
#[cfg(windows)]
std::os::windows::process::CommandExt::creation_flags(
&mut command,
0x0800_0000, // CREATE_NO_WINDOW
);
command
.arg("-C")
.arg(path)
// A checkout's own config can name programs for git to run: an