format-patch: ensure that --rfc and -k are mutually exclusive
Fix a bug that allows the "--rfc" and "-k" options to be specified together
when "git format-patch" is executed, which was introduced in the commit
e0d7db7423
("format-patch: --rfc honors what --subject-prefix sets").
Add a couple of additional tests to t4014, to cover additional cases of
the mutual exclusivity between different "git format-patch" options.
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e0d7db7423
commit
cadcf58085
@ -2044,8 +2044,10 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
if (cover_from_description_arg)
|
||||
cover_from_description_mode = parse_cover_from_description(cover_from_description_arg);
|
||||
|
||||
if (rfc)
|
||||
if (rfc) {
|
||||
strbuf_insertstr(&sprefix, 0, "RFC ");
|
||||
subject_prefix = 1;
|
||||
}
|
||||
|
||||
if (reroll_count) {
|
||||
strbuf_addf(&sprefix, " v%s", reroll_count);
|
||||
|
Reference in New Issue
Block a user