From: Junio C Hamano Date: Wed, 26 Aug 2026 21:31:23 GMT Subject: Re: [PATCH v2 2/2] commit: allow -c/-C for all kinds of --fixup Message-ID: In-Reply-To: erik@cervined.in writes: > From: Erik Cervin-Edin > > 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 > --- > 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")