From: Junio C Hamano Date: Tue, 30 Apr 2024 21:49:42 +0000 (-0700) Subject: Merge branch 'jc/format-patch-rfc-more' X-Git-Tag: v2.46.0-rc0~160 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=708e9257f8045e00dca1241ab13c1e8033ead41c;p=thirdparty%2Fgit.git Merge branch 'jc/format-patch-rfc-more' The "--rfc" option of "git format-patch" learned to take an optional string value to be used in place of "RFC" to tweak the "[PATCH]" on the subject header. * jc/format-patch-rfc-more: format-patch: "--rfc=-(WIP)" appends to produce [PATCH (WIP)] format-patch: allow --rfc to optionally take a value, like --rfc=WIP --- 708e9257f8045e00dca1241ab13c1e8033ead41c diff --cc builtin/log.c index 8bab30fcc7,4750e480e6..4da7399905 --- a/builtin/log.c +++ b/builtin/log.c @@@ -2050,9 -2065,11 +2065,12 @@@ int cmd_format_patch(int argc, const ch if (cover_from_description_arg) cover_from_description_mode = parse_cover_from_description(cover_from_description_arg); - if (rfc) { - strbuf_insertstr(&sprefix, 0, "RFC "); + if (rfc && rfc[0]) { + subject_prefix = 1; + if (rfc[0] == '-') + strbuf_addf(&sprefix, " %s", rfc + 1); + else + strbuf_insertf(&sprefix, 0, "%s ", rfc); } if (reroll_count) {