sequencer: store commit message in private context
commit53f67466153ffd291955d7d55bcb33decf664aaf
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 18 Apr 2024 13:14:08 +0000 (18 14:14 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Apr 2024 20:33:41 +0000 (18 13:33 -0700)
tree9ad5ca451fbb4bec9386f36d92235e025783bbca
parent497a01a2d3d2bef45dd76d76c769a0a2a3c80b57
sequencer: store commit message in private context

Add an strbuf to "struct replay_ctx" to hold the current commit
message. This does not change the behavior but it will allow us to fix a
bug with "git rebase --signoff" in the next commit. A future patch
series will use the changes here to avoid writing the commit message to
disc unless there are conflicts or the commit is being reworded.

The changes in do_pick_commit() are a mechanical replacement of "msgbuf"
with "ctx->message". In do_merge() the code to write commit message to
disc is factored out of the conditional now that both branches store the
message in the same buffer.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c