rerere: fix crash with files rerere can't handle
[gitweb.git] / t / t4200-rerere.sh
index 8417e5a4b105a54a8de23af8bae2bdaf28c257cb..23f9c0ca4503483428746188c5f8d0b9221b887f 100755 (executable)
@@ -580,4 +580,25 @@ test_expect_success 'multiple identical conflicts' '
        count_pre_post 0 0
 '
 
+test_expect_success 'rerere with unexpected conflict markers does not crash' '
+       git reset --hard &&
+
+       git checkout -b branch-1 master &&
+       echo "bar" >test &&
+       git add test &&
+       git commit -q -m two &&
+
+       git reset --hard &&
+       git checkout -b branch-2 master &&
+       echo "foo" >test &&
+       git add test &&
+       git commit -q -a -m one &&
+
+       test_must_fail git merge branch-1 &&
+       echo "<<<<<<< a" >test &&
+       git rerere &&
+
+       git rerere clear
+'
+
 test_done