[PATCH v2 0/2] rebase: a couple of fixup fixes
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jul 26, 2026, 15:38 UTC
- Message-ID
- <cover.1785080337.git.phillip.wood@dunelm.org.uk>
- In-Reply-To
- <cover.1784304378.git.phillip.wood@dunelm.org.uk>
These patches fix a couple of small bugs in the way skipped "fixup" and "squash" commands are handled. A skipped command can lead to an incorrect commit count in the template message which is fixed in patch 1. It can also mean we fail to open the editor after a "fixup -c" command which is fixed in patch 2
Thanks for the comments on V1. The only change here is to make sure a character non-NUL when we're checking if it isn't a LF in patch 1 as suggested by Junio.
base-commit: 9a0c4701dcd5725c4184599322b52933ff5005ca Published-As: https://github.com/phillipwood/git/releases/tag/pw%2Frebase-fixup-fixes-part-1%2Fv2 View-Changes-At: https://github.com/phillipwood/git/compare/9a0c4701d...3089979e2 Fetch-It-Via: git fetch https://github.com/phillipwood/git pw/rebase-fixup-fixes-part-1/v2
Phillip Wood (2): rebase -i: fix counting of fixups after rebase --skip rebase: remember fixup -c after skipping fixup/squash
sequencer.c | 31 ++++++++++++++++++---- t/t3418-rebase-continue.sh | 36 ++++++++++++++++++++++--- t/t3437-rebase-fixup-options.sh | 47 +++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 9 deletions(-)
Range-diff against v1:
1: c37a518486a ! 1: f95668512a8 rebase -i: fix counting of fixups after rebase --skip
@@ sequencer.c: static int read_populate_opts(struct replay_opts *opts)
+ * inserted blank lines when a fixup
+ * was skipped.
+ */
-+ if (p[1] != '\n')
++ if (p[1] && p[1] != '\n')
+ ctx->current_fixup_count++;
p++;
}
2: 7c8075ff267 = 2: 3089979e2da rebase: remember fixup -c after skipping fixup/squash-- 2.54.0.200.gfd8d68259e3