When calling format-patch, -k keeps the commit title as the patch subject and can't be used with other options that depend on the existence of a prefix. This way, -k shouldn't also be used with --subject-extra-prefix, as it introduces an extra prefix. If -k and --subject-extra-prefix are used together, die. Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@xxxxxxxxx> --- builtin/log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/log.c b/builtin/log.c index 95667c93ca..52dc0301cf 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -2256,6 +2256,8 @@ int cmd_format_patch(int argc, die(_("options '%s' and '%s' cannot be used together"), "-n", "-k"); if (cfg.keep_subject && cfg.subject_prefix) die(_("options '%s' and '%s' cannot be used together"), "--subject-prefix/--rfc", "-k"); + if (cfg.keep_subject && extra_prefix) + die(_("options '%s' and '%s' cannot be used together"), "--subject-extra-prefix", "-k"); rev.preserve_subject = cfg.keep_subject; argc = setup_revisions(argc, argv, &rev, &s_r_opt); -- 2.39.5 (Apple Git-154)