]> git.ipfire.org Git - thirdparty/git.git/commit
format-patch: allow --rfc to optionally take a value, like --rfc=WIP
authorJunio C Hamano <gitster@pobox.com>
Tue, 23 Apr 2024 17:52:33 +0000 (10:52 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Apr 2024 18:00:38 +0000 (11:00 -0700)
commitce48fb2eabccc269443f33d0f148d0061b94a101
treeb681fd58ca5d10c4080de3fb537f219ee89fa4a3
parent21306a098c3f174ad4c2a5cddb9069ee27a548b0
format-patch: allow --rfc to optionally take a value, like --rfc=WIP

With the "--rfc" option, we can tweak the "[PATCH]" (or whatever
string specified with the "--subject-prefix" option, instead of
"PATCH") that we prefix the title of the commit with into "[RFC
PATCH]", but some projects may want "[rfc PATCH]".  Adding a new
option, e.g., "--rfc-lowercase", to support such need every time
somebody wants to use different strings would lead to insanity of
accumulating unbounded number of such options.

Allow an optional value specified for the option, so that users can
use "--rfc=rfc" (think of "--rfc" without value as a short-hand for
"--rfc=RFC") if they wanted to.

This can of course be (ab)used to make the prefix "[WIP PATCH]" by
passing "--rfc=WIP".  Passing an empty string, i.e., "--rfc=", is
the same as "--no-rfc" to override an option given earlier on the
same command line.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-format-patch.txt
builtin/log.c
t/t4014-format-patch.sh