t3430: demonstrate what -r, --autosquash & --exec should do
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>
Johannes Schindelin committed
Aug 6, 2018 at 02:52 UTC
f0880f77abcbd2dbc948917e995680171eff28b0
1 file changed
+17
t/t3430-rebase-merges.sh
+17
@@ -363,4 +363,21 @@ test_expect_success 'octopus merges' '
363
EOF
364
'
365
366
+test_expect_failure 'with --autosquash and --exec' '
367
+ git checkout -b with-exec H &&
368
+ echo Booh >B.t &&
369
+ test_tick &&
370
+ git commit --fixup B B.t &&
371
+ write_script show.sh <<-\EOF &&
372
+ subject="$(git show -s --format=%s HEAD)"
373
+ content="$(git diff HEAD^! | tail -n 1)"
374
+ echo "$subject: $content"
375
+ EOF
376
+ test_tick &&
377
+ git rebase -ir --autosquash --exec ./show.sh A >actual &&
378
+ grep "B: +Booh" actual &&
379
+ grep "E: +Booh" actual &&
380
+ grep "G: +G" actual
381
+'
382
+
383
test_done