git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Vojtěch Knyttl" <vojtech@knyt.tl>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Martin Ågren" <martin.agren@gmail.com>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v2] rebase -i: do leave commit message intact in fixup! chains
Date: Tue, 12 Jan 2021 15:12:23 -0800	[thread overview]
Message-ID: <xmqqwnwhzr54.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.818.v2.git.1610123298764.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Fri, 08 Jan 2021 16:28:18 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> We actually need to actively suppress that clean-up lest a configured
> `commit.cleanup` may interfere with what we want to do: leave the commit
> message unchanged.

Good thinking.

> Reported-by: Vojtěch Knyttl <vojtech@knyt.tl>
> Helped-by: Martin Ågren <martin.agren@gmail.com>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> ...
> diff --git a/sequencer.c b/sequencer.c
> index 8909a467700..092e7b811f0 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -943,6 +943,7 @@ N_("you have staged changes in your working tree\n"
>  #define CLEANUP_MSG (1<<3)
>  #define VERIFY_MSG  (1<<4)
>  #define CREATE_ROOT_COMMIT (1<<5)
> +#define VERBATIM_MSG (1<<6)

It somewhat bothers me that these pretend to be orthogonal options
that can be mixed and matched, but CLEANUP and VERBATIM do not make
sense to be used at the same time.  As long as we have some safety
to ensure that both bits are not used at the same time, i.e.e.g.

	if ((flags & (CLEANUP_MSG|VERBATIM_MSG)) == (CLEANUP_MSG|VERBATIM_MSG))
		BUG("cleanup and verbatim asked at the same time");

it would be OK, though.

Thanks.

  parent reply	other threads:[~2021-01-13  0:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19  0:22 [PATCH] rebase -i: do leave commit message intact in fixup! chains Johannes Schindelin via GitGitGadget
2020-12-19 14:47 ` Martin Ågren
2020-12-19 15:00   ` Johannes Schindelin
2021-01-08 16:28 ` [PATCH v2] " Johannes Schindelin via GitGitGadget
2021-01-12 20:49   ` Martin Ågren
2021-01-28 16:19     ` Johannes Schindelin
2021-01-12 23:12   ` Junio C Hamano [this message]
2021-01-28 16:24     ` Johannes Schindelin
2021-01-28 20:18       ` Junio C Hamano
2021-01-28 16:16   ` [PATCH v3] " Johannes Schindelin via GitGitGadget

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=xmqqwnwhzr54.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=martin.agren@gmail.com \
    --cc=szeder.dev@gmail.com \
    --cc=vojtech@knyt.tl \
    /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).