public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH 0/5] rebase -m: fix --signoff with conflicts
@ 2024-04-18 13:14 Phillip Wood
  2024-04-18 13:14 ` [PATCH 1/5] sequencer: always free "struct replay_opts" Phillip Wood
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Phillip Wood @ 2024-04-18 13:14 UTC (permalink / raw)
  To: git; +Cc: David Bimmler, Johannes Schindelin

From: Phillip Wood <phillip.wood@dunelm•org.uk>

When rebasing with "--signoff" the commit created by "rebase --continue"
after resolving conflicts or editing a commit fails to add the
"Signed-off-by:" trailer. This happens because the message from the
original commit is reused instead of the one that would have been used
if the sequencer had not stopped for the user interaction. This series
fixes that by introducing an strbuf to hold the message which we then
write to rebase_path_message() when stopping for user interaction.

The patches are structured as follows:

Patches 1–3 add private "struct replay_ctx" to "struct replay_opts"
and move the private members from the latter into the former. These
changes are largely mechanical.

Patch 4 adds strbuf to "struct replay_ctx" to hold the commit
message. This change is also largely mechanical.

Patch 5 fixes the bug by using the changes in patch 4 to write the
correct message to disc when stopping for user interaction.

This series is based on a merge of 'maint' and 'pw/t3428-cleanup'. In
principle it would be passible to avoid the refactoring in patches 1–3
and add a new member to "struct replay_opts" instead. However the
changes in those patches are largely mechanical so should be low-risk
and they pave the way for more improvements and bug fixes in the
future.


base-commit: 7bd541c104a2e383dd250f5f8e514785c4cabbc0
Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Frebase-fix-signoff%2Fv1
View-Changes-At: https://github.com/phillipwood/git/compare/7bd541c10...4c8f88437
Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/rebase-fix-signoff/v1

Phillip Wood (5):
  sequencer: always free "struct replay_opts"
  sequencer: start removing private fields from public API
  sequencer: move current fixups to private context
  sequencer: store commit message in private context
  rebase -m: fix --signoff with conflicts

 sequencer.c               | 250 ++++++++++++++++++++++++--------------
 sequencer.h               |  11 +-
 t/t3428-rebase-signoff.sh |  96 ++++++++++++---
 t/t3434-rebase-i18n.sh    |   2 +-
 4 files changed, 243 insertions(+), 116 deletions(-)


base-commit: 7bd541c104a2e383dd250f5f8e514785c4cabbc0
-- 
2.44.0.661.ge68cfcc6c2f


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-18 21:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 13:14 [PATCH 0/5] rebase -m: fix --signoff with conflicts Phillip Wood
2024-04-18 13:14 ` [PATCH 1/5] sequencer: always free "struct replay_opts" Phillip Wood
2024-04-18 13:14 ` [PATCH 2/5] sequencer: start removing private fields from public API Phillip Wood
2024-04-18 20:42   ` Junio C Hamano
2024-04-18 13:14 ` [PATCH 3/5] sequencer: move current fixups to private context Phillip Wood
2024-04-18 20:48   ` Junio C Hamano
2024-04-18 13:14 ` [PATCH 4/5] sequencer: store commit message in " Phillip Wood
2024-04-18 21:03   ` Junio C Hamano
2024-04-18 13:14 ` [PATCH 5/5] rebase -m: fix --signoff with conflicts Phillip Wood
2024-04-18 21:16   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox