git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] rebase --autosquash: handle manual "final fixups"
@ 2018-08-31 23:45 Johannes Schindelin via GitGitGadget
  2018-08-31 23:45 ` [PATCH 1/2] rebase -i --autosquash: demonstrate a problem skipping the last squash Johannes Schindelin via GitGitGadget
  2018-08-31 23:45 ` [PATCH 2/2] rebase -i: be careful to wrap up fixup/squash chains Johannes Schindelin via GitGitGadget
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2018-08-31 23:45 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

'tis bug fix season! I admit, though, that this bug might be a bit too off
the trodden path to merit fast-tracking into v2.19.0.

While pairing with Jameson Miller to rebase Git for Windows to v2.19.0-rc1,
we had to fix a couple of commits which had somehow lost their proper
authorship (probably due to long fixed bugs in the interactive rebase). We
did so by using empty squash! commits as reminders, so that we could
interrupt the rebase by deleting the squash message, amend the commit
appropriately, and then continue.

This exposed an (admittedly obscure) bug in the interactive rebase: when the
last fixup or squash of a fixup/squash chain is aborted, and then the HEAD
commit is amended, the rebase would not forget about the fixup/squash chain.
It would hold onto the information about the current fixup count and the
intermediate commit message. And upon processing another fixup/squash chain,
that information would be reused!

This patch pair first introduces the test case to confirm the breakage, and
then fixes it in the minimal way.

Johannes Schindelin (2):
  rebase -i --autosquash: demonstrate a problem skipping the last squash
  rebase -i: be careful to wrap up fixup/squash chains

 sequencer.c                  | 17 ++++++++++++++---
 t/t3415-rebase-autosquash.sh | 19 +++++++++++++++++++
 2 files changed, 33 insertions(+), 3 deletions(-)


base-commit: 2f743933341f276111103550fbf383a34dfcfd38
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-30%2Fdscho%2Frebase-abort-last-squash-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-30/dscho/rebase-abort-last-squash-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/30
-- 
gitgitgadget

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

end of thread, other threads:[~2018-09-05 16:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 23:45 [PATCH 0/2] rebase --autosquash: handle manual "final fixups" Johannes Schindelin via GitGitGadget
2018-08-31 23:45 ` [PATCH 1/2] rebase -i --autosquash: demonstrate a problem skipping the last squash Johannes Schindelin via GitGitGadget
2018-09-04 19:09   ` Re*: " Junio C Hamano
2018-09-04 22:27     ` Johannes Schindelin
2018-09-05 16:28       ` Junio C Hamano
2018-08-31 23:45 ` [PATCH 2/2] rebase -i: be careful to wrap up fixup/squash chains Johannes Schindelin via GitGitGadget
2018-09-04 16:48   ` Junio C Hamano
2018-09-04 19:50     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).