Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: erik@cervined.in,  phillip.wood123@gmail.com
Subject: Re: [PATCH v2 2/2] commit: allow -c/-C for all kinds of --fixup
Date: Wed, 26 Aug 2026 14:31:23 -0700	[thread overview]
Message-ID: <xmqq1pbkefh0.fsf@gitster.g> (raw)
In-Reply-To: <b3fc743abf5d35fbb23c7483836de292ad5bffda.1779792311.git.erik@cervined.in> (erik@cervined.in's message of "Tue, 26 May 2026 12:47:44 +0200")

erik@cervined.in writes:

> From: Erik Cervin-Edin <erik@cervined.in>
>
> The previous commit allowed -m and -F for all --fixup variations.  The
> -c/-C flags were blocked by the same higher-layer incompatibility check
> that previously caught -F, namely die_for_incompatible_opt4() grouping
> them with --fixup.
>
> Drop --fixup from that check and route the resolved commit through
> prepare_amend_commit() in the fixup path, mirroring the no-message-source
> behaviour of --fixup=amend.  With this in place, -m/-F/-c/-C all behave
> consistently across the plain, amend, and reword --fixup forms.
>
> Signed-off-by: Erik Cervin-Edin <erik@cervined.in>
> ---
>  Documentation/git-commit.adoc             |  9 ++--
>  builtin/commit.c                          | 13 +++--
>  t/t7500-commit-template-squash-signoff.sh | 60 +++++++++++++++++++++--
>  3 files changed, 71 insertions(+), 11 deletions(-)

Sorry, but this topic has been hanging without getting any reviews
on the list for quite a while.

Any takers?


One small thing I noticed appears here:

> @@ -1341,7 +1346,7 @@ static int parse_and_validate_options(int argc, const char *argv[],
>  		die(_("options '%s' and '%s' cannot be used together"), "--squash", "--fixup");
>  	die_for_incompatible_opt3(!!use_message, "-C",
>  				  !!edit_message, "-c",
> -				  !!fixup_message, "--fixup");
> +				  !!logfile, "-F");
>  	die_for_incompatible_opt4(have_option_m, "-m",
>  				  !!edit_message, "-c",
>  				  !!use_message, "-C",

This blocks -C, -c, -F from being used together.  But the next
opt4() covers these combinations already:

  	die_for_incompatible_opt4(have_option_m, "-m",
  				  !!edit_message, "-c",
  				  !!use_message, "-C",
  				  !!logfile, "-F")

      reply	other threads:[~2026-08-26 21:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 11:22 [PATCH 0/1] commit: allow -m/-F with --fixup=amend: or reword: erik
2026-05-18 11:22 ` [PATCH 1/1] " erik
2026-05-18 12:39   ` Junio C Hamano
2026-05-18 15:27     ` Phillip Wood
2026-05-24 15:00       ` Erik Cervin Edin
2026-05-26 10:47 ` [PATCH v2 0/2] commit: allow -m/-F/-c/-C for all --fixup variations erik
2026-05-26 10:47   ` [PATCH v2 1/2] commit: allow -m/-F for all kinds of --fixup erik
2026-05-26 10:47   ` [PATCH v2 2/2] commit: allow -c/-C " erik
2026-08-26 21:31     ` Junio C Hamano [this message]

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=xmqq1pbkefh0.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=erik@cervined.in \
    --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