diff --git a/crates/uv/tests/it/common/mod.rs b/crates/uv/tests/it/common/mod.rs index 36f0141cd0fb..6b1a255619df 100644 --- a/crates/uv/tests/it/common/mod.rs +++ b/crates/uv/tests/it/common/mod.rs @@ -332,6 +332,11 @@ impl TestContext { let root = tempfile::TempDir::new_in(bucket).expect("Failed to create test root directory"); + // Create a `.git` directory to isolate tests that search for git boundaries from the state + // of the file system + fs_err::create_dir_all(root.path().join(".git")) + .expect("Failed to create `.git` placeholder in test root directory"); + let temp_dir = ChildPath::new(root.path()).child("temp"); fs_err::create_dir_all(&temp_dir).expect("Failed to create test working directory");