summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-11 17:41:02 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-11 17:41:02 -0700
commit5beeefea318593cbfd0425651f2ed60de46016ba (patch)
tree2431d2ddfc9f5f92c9657f8b1a8134b748d7906c /t
parentb3569933dd8962e79ce5e1232f06a9b74026b762 (diff)
parentb9e31f59478eeae3e4230308f6fc06713c6fc547 (diff)
downloadgit-5beeefea318593cbfd0425651f2ed60de46016ba.tar.gz
Merge branch 'js/rerere-forget-protect-against-NUL'
A few bugfixes to "git rerere" working on corner case merge conflicts. * js/rerere-forget-protect-against-NUL: rerere forget: do not segfault if not all stages are present rerere forget: grok files containing NUL
Diffstat (limited to 't')
-rwxr-xr-xt/t2030-unresolve-info.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t2030-unresolve-info.sh b/t/t2030-unresolve-info.sh
index f2620650ce..309199bca2 100755
--- a/t/t2030-unresolve-info.sh
+++ b/t/t2030-unresolve-info.sh
@@ -44,14 +44,21 @@ 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 &&
+ git branch add-add &&
git checkout another &&
test_commit fourth fi/le fourth &&
+ git checkout add-add &&
+ test_commit fifth add-differently &&
git checkout master
'
@@ -167,4 +174,22 @@ 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_expect_success 'rerere forget (add-add conflict)' '
+ git checkout -f master &&
+ echo master >add-differently &&
+ git add add-differently &&
+ git commit -m "add differently" &&
+ test_must_fail git merge fifth &&
+ git rerere forget add-differently 2>actual &&
+ test_i18ngrep "no remembered" actual
+'
+
test_done