]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/format-patch-force-in-body-from'
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 19:02:25 +0000 (12:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Sep 2022 19:02:25 +0000 (12:02 -0700)
"git format-patch --from=<ident>" can be told to add an in-body
"From:" line even for commits that are authored by the given
<ident> 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

1  2 
builtin/log.c
revision.h

diff --cc builtin/log.c
index 56e2d95e869db145f769915882dd00d25f27bc18,776bc9afdb47d7c90dc7fd786db94f88684f4cae..047f9e5278ddd10ce286d0fb681341796c29609f
@@@ -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);
diff --cc revision.h
Simple merge