blob: 3bbc731f67e50bdd65dd361cd9ca249ff706728f [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 Hamano3d1b5a12013-05-17 23:34:0212'git mailinfo' [-k|-b] [-u | --encoding=<encoding> | -n] [--[no-]scissors] <msg> <patch>
Junio C Hamano1a4e8412005-12-27 08:17:2313
14
15DESCRIPTION
16-----------
Junio C Hamano54bf1e22008-12-20 06:30:1117Reads a single e-mail message from the standard input, and
Junio C Hamano1a4e8412005-12-27 08:17:2318writes the commit log message in <msg> file, and the patches in
19<patch> file. The author name, e-mail and e-mail subject are
Junio C Hamano1aa40d22010-01-21 17:46:4320written out to the standard output to be used by 'git am'
Junio C Hamano1a4e8412005-12-27 08:17:2321to create a commit. It is usually not necessary to use this
Junio C Hamano35738e82008-01-07 07:55:4622command directly. See linkgit:git-am[1] instead.
Junio C Hamano1a4e8412005-12-27 08:17:2323
24
25OPTIONS
26-------
27-k::
Junio C Hamano864ba892012-01-13 17:42:0528Usually the program removes email cruft from the Subject:
29header line to extract the title line for the commit log
30message. This option prevents this munging, and is most
31useful when used to read back 'git format-patch -k' output.
32+
33Specifically, the following are removed until none of them remain:
34+
35--
36* Leading and trailing whitespace.
37
38* Leading `Re:`, `re:`, and `:`.
39
40* Leading bracketed strings (between `[` and `]`, usually
41`[PATCH]`).
42--
43+
44Finally, runs of whitespace are normalized to a single ASCII space
45character.
Junio C Hamano1a4e8412005-12-27 08:17:2346
Junio C Hamano2bd8a742009-12-01 21:16:5947-b::
48When -k is not in effect, all leading strings bracketed with '['
49and ']' pairs are stripped. This option limits the stripping to
50only the pairs whose bracketed string contains the word "PATCH".
51
Junio C Hamano1a4e8412005-12-27 08:17:2352-u::
Junio C Hamano27eacdb2007-01-10 05:37:4753The commit log message, author name and author email are
54taken from the e-mail, and after minimally decoding MIME
Junio C Hamanod8c8c562010-06-14 05:18:2555transfer encoding, re-coded in the charset specified by
56i18n.commitencoding (defaulting to UTF-8) by transliterating
Junio C Hamano27eacdb2007-01-10 05:37:4757them. This used to be optional but now it is the default.
58+
59Note that the patch is always used as-is without charset
60conversion, even with this flag.
Junio C Hamano1a4e8412005-12-27 08:17:2361
62--encoding=<encoding>::
Junio C Hamanod8c8c562010-06-14 05:18:2563Similar to -u. But when re-coding, the charset specified here is
64used instead of the one specified by i18n.commitencoding or UTF-8.
Junio C Hamano1a4e8412005-12-27 08:17:2365
Junio C Hamano46a38aa2008-07-14 03:13:2766-n::
67Disable all charset re-coding of the metadata.
68
Junio C Hamano6df93d92014-12-22 22:48:0969-m::
70--message-id::
71Copy the Message-ID header at the end of the commit message. This
72is useful in order to associate commits with mailing list discussions.
73
Junio C Hamanoc28068f2009-09-08 00:55:2374--scissors::
75Remove everything in body before a scissors line. A line that
76mainly consists of scissors (either ">8" or "8<") and perforation
77(dash "-") marks is called a scissors line, and is used to request
78the reader to cut the message at that line. If such a line
79appears in the body of the message before the patch, everything
80before it (including the scissors line itself) is ignored when
81this option is used.
82+
83This is useful if you want to begin your message in a discussion thread
84with comments and suggestions on the message you are responding to, and to
85conclude it with a patch submission, separating the discussion and the
86beginning of the proposed commit log message with a scissors line.
Junio C Hamanocf5b7732009-09-11 23:28:3287+
Junio C Hamano198b1f12016-05-17 22:27:2488This can be enabled by default with the configuration option mailinfo.scissors.
Junio C Hamanocf5b7732009-09-11 23:28:3289
90--no-scissors::
91Ignore scissors lines. Useful for overriding mailinfo.scissors settings.
Junio C Hamanoc28068f2009-09-08 00:55:2392
Junio C Hamano1a4e8412005-12-27 08:17:2393<msg>::
94The commit log message extracted from e-mail, usually
95except the title line which comes from e-mail Subject.
96
97<patch>::
98The patch extracted from e-mail.
99
Junio C Hamano1a4e8412005-12-27 08:17:23100GIT
101---
Junio C Hamanof7c042d2008-06-06 22:50:53102Part of the linkgit:git[1] suite