git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] rebase --autosquash: handle manual "final fixups"

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 31, 2018, 23:45 UTC
Message-ID
<pull.30.git.gitgitgadget@gmail.com>

'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
Next: Johannes Schindelin via GitGitGadget
Message 1 of 8 in “rebase --autosquash: handle manual "final fixups"”
  1. 0/2 rebase --autosquash: handle manual "final fixups"Johannes Schindelin via GitGitGadget, Aug 31, 2018
  2. 1/2 rebase -i --autosquash: demonstrate a problem skipping the last squashJohannes Schindelin via GitGitGadget, Aug 31, 2018
  3. Re*: [PATCH 1/2] rebase -i --autosquash: demonstrate a problem skipping the last squashJunio C Hamano, Sep 4, 2018
  4. Johannes SchindelinSep 4, 2018
  5. Junio C HamanoSep 5, 2018
  6. 2/2 rebase -i: be careful to wrap up fixup/squash chainsJohannes Schindelin via GitGitGadget, Aug 31, 2018
  7. Junio C HamanoSep 4, 2018
  8. Johannes SchindelinSep 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.