summaryrefslogtreecommitdiff
path: root/t/t4200-rerere.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-09-11 18:55:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-11 20:43:21 (GMT)
commit38c93c4d9d11b881697229d15420fc5c1367d7a9 (patch)
tree6c1fa911d1697dec194311db0f49625383f0f2ad /t/t4200-rerere.sh
parentfc54c1af3ec09bab8b8ea09768c2da4069b7f53e (diff)
downloadgit-38c93c4d9d11b881697229d15420fc5c1367d7a9.zip
git-38c93c4d9d11b881697229d15420fc5c1367d7a9.tar.gz
git-38c93c4d9d11b881697229d15420fc5c1367d7a9.tar.bz2
t4200: demonstrate rerere segfault on specially crafted merge
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4200-rerere.sh')
-rwxr-xr-xt/t4200-rerere.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index d97d2be..ed9e495 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -580,4 +580,33 @@ test_expect_success 'multiple identical conflicts' '
count_pre_post 0 0
'
+test_expect_success 'setup simple stage 1 handling' '
+ test_create_repo stage_1_handling &&
+ (
+ cd stage_1_handling &&
+
+ test_seq 1 10 >original &&
+ git add original &&
+ git commit -m original &&
+
+ git checkout -b A master &&
+ git mv original A &&
+ git commit -m "rename to A" &&
+
+ git checkout -b B master &&
+ git mv original B &&
+ git commit -m "rename to B"
+ )
+'
+
+test_expect_failure 'test simple stage 1 handling' '
+ (
+ cd stage_1_handling &&
+
+ git config rerere.enabled true &&
+ git checkout A^0 &&
+ test_must_fail git merge B^0
+ )
+'
+
test_done