t3430: demonstrate what -r, --autosquash & --exec should do
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 6 Aug 2018 09:52:52 +0000 (02:52 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Aug 2018 20:15:29 +0000 (13:15 -0700)
The --exec option's implementation is not really well-prepared for
--rebase-merges. Demonstrate this.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3430-rebase-merges.sh
index 9e622972744a15a9e20c032b390426d39e59ddbf..0bf5eaa376be2749297c56c31c9aa744ea46b90b 100755 (executable)
@@ -363,4 +363,21 @@ test_expect_success 'octopus merges' '
        EOF
 '
 
+test_expect_failure 'with --autosquash and --exec' '
+       git checkout -b with-exec H &&
+       echo Booh >B.t &&
+       test_tick &&
+       git commit --fixup B B.t &&
+       write_script show.sh <<-\EOF &&
+       subject="$(git show -s --format=%s HEAD)"
+       content="$(git diff HEAD^! | tail -n 1)"
+       echo "$subject: $content"
+       EOF
+       test_tick &&
+       git rebase -ir --autosquash --exec ./show.sh A >actual &&
+       grep "B: +Booh" actual &&
+       grep "E: +Booh" actual &&
+       grep "G: +G" actual
+'
+
 test_done