rerere forget: grok files containing NUL
[gitweb.git] / t / t2030-unresolve-info.sh
index f2620650ce1d25252210c07db20e54f99bd515c6..0b699f50dd17b884c391135c2e18ca6b6df0b51a 100755 (executable)
@@ -44,9 +44,13 @@ prime_resolve_undo () {
 
 test_expect_success setup '
        mkdir fi &&
+       printf "a\0a" >binary &&
+       git add binary &&
        test_commit initial fi/le first &&
        git branch side &&
        git branch another &&
+       printf "a\0b" >binary &&
+       git add binary &&
        test_commit second fi/le second &&
        git checkout side &&
        test_commit third fi/le third &&
@@ -167,4 +171,12 @@ test_expect_success 'rerere and rerere forget (subdirectory)' '
        test_cmp expect actual
 '
 
+test_expect_success 'rerere forget (binary)' '
+       git checkout -f side &&
+       printf "a\0c" >binary &&
+       git commit -a -m binary &&
+       test_must_fail git merge second &&
+       git rerere forget binary
+'
+
 test_done