git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: git@vger.kernel.org,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Simon Cheng <cyqsimon@gmail.com>
Subject: Re: [PATCH 1/2] rebase -i: respect commit.cleanup when picking fixups
Date: Thu, 18 Sep 2025 08:29:06 -0700	[thread overview]
Message-ID: <xmqqtt0z93ul.fsf@gitster.g> (raw)
In-Reply-To: <8fb1b4b4a5f4857a3d7d98d029b22904751ec144.1758186038.git.phillip.wood@dunelm.org.uk> (Phillip Wood's message of "Thu, 18 Sep 2025 10:00:38 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

> ... The cause of that
> bug was that before f7d42ceec52 the sequencer passed CLEANUP_MSG
> when committing the final fixup. That commit should have simply
> removed the CLEANUP_MSG flag, not changed it to VERBATIM_MSG. Using
> VERBATIM_MSG ignores the user's commit.cleanup config when committing
> the final fixup which means it behaves differently to an ordinary
> "pick" command which respects commit.cleanup.

So cleanly analysed and clearly described. 

> diff --git a/sequencer.c b/sequencer.c
> index 9ae40a91b24..47c57c2ea3c 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -2436,7 +2436,6 @@ static int do_pick_commit(struct repository *r,
>  		if (!final_fixup)
>  			msg_file = rebase_path_squash_msg();
>  		else if (file_exists(rebase_path_fixup_msg())) {
> -			flags |= VERBATIM_MSG;
>  			msg_file = rebase_path_fixup_msg();
>  		} else {
>  			const char *dest = git_path_squash_msg(r);

And this is the location the earlier commit replaced the code that
sets CLEANUP_MSG, which matches the fix described in the proposed
log message.  Makes sense.

The commit at the source of the bug is what introduced VERBATIM_MSG,
and I think it can be removed (this was the only place it was set).

And you removed it in a separate step ;-).  Well done.

Thanks.

  reply	other threads:[~2025-09-18 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18  9:00 [PATCH 0/2] rebase -i: respect commit.cleanup when picking fixups Phillip Wood
2025-09-18  9:00 ` [PATCH 1/2] " Phillip Wood
2025-09-18 15:29   ` Junio C Hamano [this message]
2025-09-18  9:00 ` [PATCH 2/2] sequencer: remove VERBATIM_MSG flag Phillip Wood

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

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

  git send-email \
    --in-reply-to=xmqqtt0z93ul.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=cyqsimon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.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.
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).