summaryrefslogtreecommitdiff
path: root/t/t3415-rebase-autosquash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-14 21:39:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-14 21:39:43 (GMT)
commita2a0942a16a6459d4a52e7ee4ec85f7f90ad5334 (patch)
tree83dcf90fd0897ccf3974021dddd6e48042c89637 /t/t3415-rebase-autosquash.sh
parent73d9f96b4790e16335a30380f97d46bd065dc07b (diff)
parent02471e7e205c3e6c80f7908877640c0eed526fda (diff)
downloadgit-a2a0942a16a6459d4a52e7ee4ec85f7f90ad5334.zip
git-a2a0942a16a6459d4a52e7ee4ec85f7f90ad5334.tar.gz
git-a2a0942a16a6459d4a52e7ee4ec85f7f90ad5334.tar.bz2
Merge branch 'js/rebase-autosquash-double-fixup-fix'
"rebase -i" segfaulted when rearranging a sequence that has a fix-up that applies another fix-up (which may or may not be a fix-up of yet another step). * js/rebase-autosquash-double-fixup-fix: rebase --autosquash: fix a potential segfault
Diffstat (limited to 't/t3415-rebase-autosquash.sh')
-rwxr-xr-xt/t3415-rebase-autosquash.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 093de90..7bab600 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -424,4 +424,20 @@ test_expect_success 'abort last squash' '
! grep first actual
'
+test_expect_success 'fixup a fixup' '
+ echo 0to-fixup >file0 &&
+ test_tick &&
+ git commit -m "to-fixup" file0 &&
+ test_tick &&
+ git commit --squash HEAD -m X --allow-empty &&
+ test_tick &&
+ git commit --squash HEAD^ -m Y --allow-empty &&
+ test_tick &&
+ git commit -m "squash! $(git rev-parse HEAD^)" -m Z --allow-empty &&
+ test_tick &&
+ git commit -m "squash! $(git rev-parse HEAD^^)" -m W --allow-empty &&
+ git rebase -ki --autosquash HEAD~5 &&
+ test XZWY = $(git show | tr -cd W-Z)
+'
+
test_done