From: Junio C Hamano Date: Fri, 9 Sep 2022 19:02:25 +0000 (-0700) Subject: Merge branch 'jc/format-patch-force-in-body-from' X-Git-Tag: v2.38.0-rc0~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e2a4764edea38c4aad95af246d6a7648a7d5e2d;p=thirdparty%2Fgit.git Merge branch 'jc/format-patch-force-in-body-from' "git format-patch --from=" can be told to add an in-body "From:" line even for commits that are authored by the given with "--force-in-body-from"option. * jc/format-patch-force-in-body-from: format-patch: learn format.forceInBodyFrom configuration variable format-patch: allow forcing the use of in-body From: header pretty: separate out the logic to decide the use of in-body from --- 0e2a4764edea38c4aad95af246d6a7648a7d5e2d diff --cc builtin/log.c index 56e2d95e86,776bc9afdb..047f9e5278 --- a/builtin/log.c +++ b/builtin/log.c @@@ -1989,9 -1944,11 +1996,11 @@@ int cmd_format_patch(int argc, const ch */ argc = parse_options(argc, argv, prefix, builtin_format_patch_options, builtin_format_patch_usage, - PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN | + PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN_OPT | PARSE_OPT_KEEP_DASHDASH); + rev.force_in_body_from = force_in_body_from; + /* Make sure "0000-$sub.patch" gives non-negative length for $sub */ if (fmt_patch_name_max <= strlen("0000-") + strlen(fmt_patch_suffix)) fmt_patch_name_max = strlen("0000-") + strlen(fmt_patch_suffix);