From 20c0c581f8fdfd15a2ba49d26aa302b42430c365 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 4 May 2022 06:32:02 +0800 Subject: [PATCH] Note that `.git` folder cannot be tracked under a git repo --- tests/testsuite/init.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testsuite/init.rs b/tests/testsuite/init.rs index e0526e95b37..ebb05f3885a 100644 --- a/tests/testsuite/init.rs +++ b/tests/testsuite/init.rs @@ -401,6 +401,7 @@ fn reserved_name() { #[cargo_test] fn git_autodetect() { let project_root = &paths::root().join("foo"); + // Need to create `.git` dir manually because it cannot be tracked under a git repo fs::create_dir_all(project_root.join(".git")).unwrap(); snapbox::cmd::Command::cargo()