rebase -i: do leave commit message intact in fixup! chains
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 28 Jan 2021 16:16:42 +0000 (16:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jan 2021 20:12:37 +0000 (12:12 -0800)
commitf7d42ceec5265f6dbcaeb527657521b7ec8ddc94
treed12d9ae0d8ae3189fa378a6c08125da20d705f57
parent71ca53e8125e36efbda17293c50027d31681a41f
rebase -i: do leave commit message intact in fixup! chains

In 6e98de72c03 (sequencer (rebase -i): add support for the 'fixup' and
'squash' commands, 2017-01-02), this developer introduced a change of
behavior by mistake: when encountering a `fixup!` commit (or multiple
`fixup!` commits) without any `squash!` commit thrown in, the final `git
commit` was invoked with `--cleanup=strip`. Prior to that commit, the
commit command had been called without that `--cleanup` option.

Since we explicitly read the original commit message from a file in that
case, there is really no sense in forcing that clean-up.

We actually need to actively suppress that clean-up lest a configured
`commit.cleanup` may interfere with what we want to do: leave the commit
message unchanged.

Reported-by: Vojtěch Knyttl <vojtech@knyt.tl>
Helped-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3415-rebase-autosquash.sh