]> git.ipfire.org Git - thirdparty/git.git/commit
commit: allow -c/-C for all kinds of --fixup
authorErik Cervin-Edin <erik@cervined.in>
Tue, 26 May 2026 10:47:44 +0000 (12:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2026 11:46:24 +0000 (20:46 +0900)
commitf1c098502df421cb0c96bb168044c278ef9d7990
treeb55c113aa62fe5d84995f70ce12424e3041953a3
parent30eb1e6579559f5fc3127b32c5e9b55b5b418cd6
commit: allow -c/-C for all kinds of --fixup

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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-commit.adoc
builtin/commit.c
t/t7500-commit-template-squash-signoff.sh