Skip to content

Commit 1d82eb4

Browse files
committed
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 <[email protected]>
1 parent 1d89318 commit 1d82eb4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

t/t3430-rebase-merges.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,4 +363,21 @@ test_expect_success 'octopus merges' '
363363
EOF
364364
'
365365

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+
366383
test_done

0 commit comments

Comments
 (0)