From: Junio C Hamano Date: Thu, 7 Sep 2023 22:06:08 +0000 (-0700) Subject: Merge branch 'dd/format-patch-rfc-updates' X-Git-Tag: v2.43.0-rc0~103 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09684a12b05b6c01c638cb14e3d765a93d154e32;p=thirdparty%2Fgit.git Merge branch 'dd/format-patch-rfc-updates' "git format-patch --rfc --subject-prefix=" used to ignore the "--subject-prefix" option and used "[RFC PATCH]"; now we will add "RFC" prefix to whatever subject prefix is specified. This is a backward compatible change that may deserve a note. * dd/format-patch-rfc-updates: format-patch: --rfc honors what --subject-prefix sets --- 09684a12b05b6c01c638cb14e3d765a93d154e32 diff --cc Documentation/git-format-patch.txt index 8e515c7dbb,62345ed764..711823a7f4 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@@ -215,15 -215,17 +215,21 @@@ is greater than 100 bytes, then the mod If `` is `none`, both the cover letter subject and body will be populated with placeholder text. +--description-file=:: + Use the contents of instead of the branch's description + for generating the cover letter. + --subject-prefix=:: Instead of the standard '[PATCH]' prefix in the subject - line, instead use '[]'. This - allows for useful naming of a patch series, and can be - combined with the `--numbered` option. + line, instead use '[]'. This can be used + to name a patch series, and can be combined with the + `--numbered` option. + + + The configuration variable `format.subjectPrefix` may also be used + to configure a subject prefix to apply to a given repository for + all patches. This is often useful on mailing lists which receive + patches for several repositories and can be used to disambiguate + the patches (with a value of e.g. "PATCH my-project"). --filename-max-length=:: Instead of the standard 64 bytes, chomp the generated output diff --cc builtin/log.c index 87088077d9,75762b497d..195cd46cdc --- a/builtin/log.c +++ b/builtin/log.c @@@ -1949,9 -1932,7 +1945,9 @@@ int cmd_format_patch(int argc, const ch OPT_STRING(0, "cover-from-description", &cover_from_description_arg, N_("cover-from-description-mode"), N_("generate parts of a cover letter based on a branch's description")), + OPT_FILENAME(0, "description-file", &description_file, + N_("use branch description from file")), - OPT_CALLBACK_F(0, "subject-prefix", &rev, N_("prefix"), + OPT_CALLBACK_F(0, "subject-prefix", &sprefix, N_("prefix"), N_("use [] instead of [PATCH]"), PARSE_OPT_NONEG, subject_prefix_callback), OPT_CALLBACK_F('o', "output-directory", &output_directory,