aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
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 28e2eb1ce..a38bd6df8 100755
--- a/t/t2030-unresolve-info.sh
+++ b/t/t2030-unresolve-info.sh
@@ -115,4 +115,29 @@ test_expect_success 'unmerge with plumbing' '
test $(wc -l <actual) = 3
'
+test_expect_success 'rerere and rerere --forget' '
+ mkdir .git/rr-cache &&
+ prime_resolve_undo &&
+ echo record the resolution &&
+ git rerere &&
+ rerere_id=$(cd .git/rr-cache && echo */postimage) &&
+ rerere_id=${rerere_id%/postimage} &&
+ test -f .git/rr-cache/$rerere_id/postimage &&
+ git checkout -m file &&
+ echo resurrect the conflict &&
+ grep "^=======" file &&
+ echo reresolve the conflict &&
+ git rerere &&
+ test "z$(cat file)" = zdifferent &&
+ echo register the resolution again &&
+ git add file &&
+ check_resolve_undo kept file initial:file second:file third:file &&
+ test -z "$(git ls-files -u)" &&
+ git rerere forget file &&
+ ! test -f .git/rr-cache/$rerere_id/postimage &&
+ tr "\0" "\n" <.git/MERGE_RR >actual &&
+ echo "$rerere_id file" >expect &&
+ test_cmp expect actual
+'
+
test_done