]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3600-rm.sh
Merge branch 'jc/denoise-rm-to-resolve' into maint
[thirdparty/git.git] / t / t3600-rm.sh
index 85ae7dc1e4618275413a8b498f43d43f3e0ead92..66282a720ee853e7442334c889e199978aac9260 100755 (executable)
@@ -252,6 +252,19 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
        test_path_is_missing .git/index.lock
 '
 
+test_expect_success 'Resolving by removal is not a warning-worthy event' '
+       git reset -q --hard &&
+       test_when_finished "rm -f .git/index.lock msg && git reset -q --hard" &&
+       blob=$(echo blob | git hash-object -w --stdin) &&
+       for stage in 1 2 3
+       do
+               echo "100644 $blob $stage       blob"
+       done | git update-index --index-info &&
+       git rm blob >msg 2>&1 &&
+       test_i18ngrep ! "needs merge" msg &&
+       test_must_fail git ls-files -s --error-unmatch blob
+'
+
 test_expect_success 'rm removes subdirectories recursively' '
        mkdir -p dir/subdir/subsubdir &&
        echo content >dir/subdir/subsubdir/file &&