File tree 1 file changed +22
-0
lines changed 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -669,6 +669,28 @@ test_expect_success 'git clean -d skips untracked dirs containing ignored files'
669
669
test_path_is_missing foo/b/bb
670
670
'
671
671
672
+ test_expect_failure ' git clean -d skips nested repo containing ignored files' '
673
+ test_when_finished "rm -rf nested-repo-with-ignored-file" &&
674
+
675
+ git init nested-repo-with-ignored-file &&
676
+ (
677
+ cd nested-repo-with-ignored-file &&
678
+ >file &&
679
+ git add file &&
680
+ git commit -m Initial &&
681
+
682
+ # This file is ignored by a .gitignore rule in the outer repo
683
+ # added in the previous test.
684
+ >ignoreme
685
+ ) &&
686
+
687
+ git clean -fd &&
688
+
689
+ test_path_is_file nested-repo-with-ignored-file/.git/index &&
690
+ test_path_is_file nested-repo-with-ignored-file/ignoreme &&
691
+ test_path_is_file nested-repo-with-ignored-file/file
692
+ '
693
+
672
694
test_expect_success MINGW ' handle clean & core.longpaths = false nicely' '
673
695
test_config core.longpaths false &&
674
696
a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
You can’t perform that action at this time.
0 commit comments