]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t6415-merge-dir-to-symlink.sh
tests: remove leftover untracked files
[thirdparty/git.git] / t / t6415-merge-dir-to-symlink.sh
index 2ce104aca7cc2923aa88d191efec2894d12eb86e..2655e295f5ae4536eaf86dcf95e8062f61cc2948 100755 (executable)
@@ -25,7 +25,8 @@ test_expect_success 'checkout does not clobber untracked symlink' '
        git reset --hard main &&
        git rm --cached a/b &&
        git commit -m "untracked symlink remains" &&
-       test_must_fail git checkout start^0
+       test_must_fail git checkout start^0 &&
+       git clean -fd    # Do not leave the untracked symlink in the way
 '
 
 test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
@@ -34,7 +35,8 @@ test_expect_success 'a/b-2/c/d is kept when clobbering symlink b' '
        git rm --cached a/b &&
        git commit -m "untracked symlink remains" &&
        git checkout -f start^0 &&
-       test_path_is_file a/b-2/c/d
+       test_path_is_file a/b-2/c/d &&
+       git clean -fd    # Do not leave the untracked symlink in the way
 '
 
 test_expect_success 'checkout should not have deleted a/b-2/c/d' '