git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/2] rebase --autosquash: handle manual "final fixups"
Date: Fri, 31 Aug 2018 16:45:01 -0700 (PDT)	[thread overview]
Message-ID: <pull.30.git.gitgitgadget@gmail.com> (raw)

'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

             reply	other threads:[~2018-08-31 23:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 23:45 Johannes Schindelin via GitGitGadget [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.30.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).