blob: 3fcfd965fdec62613567278dbd7b08b0080778c7 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-mailinfo(1)
2===============
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-mailinfo - Extracts patch and authorship from a single e-mail message
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamano608b11d2021-05-16 21:40:4512'git mailinfo' [-k|-b] [-u | --encoding=<encoding> | -n]
13 [--[no-]scissors] [--quoted-cr=<action>]
14 <msg> <patch>
Junio C Hamano1a4e8412005-12-27 08:17:2315
16
17DESCRIPTION
18-----------
Junio C Hamano54bf1e22008-12-20 06:30:1119Reads a single e-mail message from the standard input, and
Junio C Hamano1a4e8412005-12-27 08:17:2320writes the commit log message in <msg> file, and the patches in
21<patch> file. The author name, e-mail and e-mail subject are
Junio C Hamano1aa40d22010-01-21 17:46:4322written out to the standard output to be used by 'git am'
Junio C Hamano1a4e8412005-12-27 08:17:2323to create a commit. It is usually not necessary to use this
Junio C Hamano35738e82008-01-07 07:55:4624command directly. See linkgit:git-am[1] instead.
Junio C Hamano1a4e8412005-12-27 08:17:2325
26
27OPTIONS
28-------
29-k::
Junio C Hamano864ba892012-01-13 17:42:0530Usually the program removes email cruft from the Subject:
31header line to extract the title line for the commit log
32message. This option prevents this munging, and is most
33useful when used to read back 'git format-patch -k' output.
34+
35Specifically, the following are removed until none of them remain:
36+
37--
38* Leading and trailing whitespace.
39
40* Leading `Re:`, `re:`, and `:`.
41
42* Leading bracketed strings (between `[` and `]`, usually
43`[PATCH]`).
44--
45+
46Finally, runs of whitespace are normalized to a single ASCII space
47character.
Junio C Hamano1a4e8412005-12-27 08:17:2348
Junio C Hamano2bd8a742009-12-01 21:16:5949-b::
50When -k is not in effect, all leading strings bracketed with '['
51and ']' pairs are stripped. This option limits the stripping to
52only the pairs whose bracketed string contains the word "PATCH".
53
Junio C Hamano1a4e8412005-12-27 08:17:2354-u::
Junio C Hamano27eacdb2007-01-10 05:37:4755The commit log message, author name and author email are
56taken from the e-mail, and after minimally decoding MIME
Junio C Hamanod8c8c562010-06-14 05:18:2557transfer encoding, re-coded in the charset specified by
Junio C Hamanoa372d5b2021-02-26 01:34:3758`i18n.commitEncoding` (defaulting to UTF-8) by transliterating
Junio C Hamano27eacdb2007-01-10 05:37:4759them. This used to be optional but now it is the default.
60+
61Note that the patch is always used as-is without charset
62conversion, even with this flag.
Junio C Hamano1a4e8412005-12-27 08:17:2363
64--encoding=<encoding>::
Junio C Hamanod8c8c562010-06-14 05:18:2565Similar to -u. But when re-coding, the charset specified here is
Junio C Hamanoa372d5b2021-02-26 01:34:3766used instead of the one specified by `i18n.commitEncoding` or UTF-8.
Junio C Hamano1a4e8412005-12-27 08:17:2367
Junio C Hamano46a38aa2008-07-14 03:13:2768-n::
69Disable all charset re-coding of the metadata.
70
Junio C Hamano6df93d92014-12-22 22:48:0971-m::
72--message-id::
73Copy the Message-ID header at the end of the commit message. This
74is useful in order to associate commits with mailing list discussions.
75
Junio C Hamanoc28068f2009-09-08 00:55:2376--scissors::
Junio C Hamano36ebb0e2020-10-04 20:44:1277Remove everything in body before a scissors line (e.g. "-- >8 --").
78The line represents scissors and perforation marks, and is used to
79request the reader to cut the message at that line. If that line
Junio C Hamanoc28068f2009-09-08 00:55:2380appears in the body of the message before the patch, everything
81before it (including the scissors line itself) is ignored when
82this option is used.
83+
84This is useful if you want to begin your message in a discussion thread
85with comments and suggestions on the message you are responding to, and to
86conclude it with a patch submission, separating the discussion and the
87beginning of the proposed commit log message with a scissors line.
Junio C Hamanocf5b7732009-09-11 23:28:3288+
Junio C Hamano198b1f12016-05-17 22:27:2489This can be enabled by default with the configuration option mailinfo.scissors.
Junio C Hamanocf5b7732009-09-11 23:28:3290
91--no-scissors::
92Ignore scissors lines. Useful for overriding mailinfo.scissors settings.
Junio C Hamanoc28068f2009-09-08 00:55:2393
Junio C Hamano608b11d2021-05-16 21:40:4594--quoted-cr=<action>::
95Action when processes email messages sent with base64 or
96quoted-printable encoding, and the decoded lines end with a CRLF
97instead of a simple LF.
98+
99The valid actions are:
100+
101--
102* `nowarn`: Git will do nothing when such a CRLF is found.
103* `warn`: Git will issue a warning for each message if such a CRLF is
104found.
105* `strip`: Git will convert those CRLF to LF.
106--
107+
108The default action could be set by configuration option `mailinfo.quotedCR`.
109If no such configuration option has been set, `warn` will be used.
110
Junio C Hamano1a4e8412005-12-27 08:17:23111<msg>::
112The commit log message extracted from e-mail, usually
113except the title line which comes from e-mail Subject.
114
115<patch>::
116The patch extracted from e-mail.
117
Junio C Hamano1a4e8412005-12-27 08:17:23118GIT
119---
Junio C Hamanof7c042d2008-06-06 22:50:53120Part of the linkgit:git[1] suite