Skip to content

Commit 82553cb

Browse files
trastgitster
authored andcommitted
mailinfo documentation: accurately describe non -k case
Since its very first description of -k, the documentation for git-mailinfo claimed that (in the case without -k) after cleaning up bracketed strings [blah], it would insert [PATCH]. It doesn't; on the contrary, one of the important jobs of mailinfo is to remove those strings. Since we're already there, rewrite the paragraph to give a complete enumeration of all the transformations. Specifically, it was missing the whitespace normalization (run of isspace(c) -> ' ') and the removal of leading ':'. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f67d2e8 commit 82553cb

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

Documentation/git-mailinfo.txt

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@ command directly. See linkgit:git-am[1] instead.
2424
OPTIONS
2525
-------
2626
-k::
27-
Usually the program 'cleans up' the Subject: header line
28-
to extract the title line for the commit log message,
29-
among which (1) remove 'Re:' or 're:', (2) leading
30-
whitespaces, (3) '[' up to ']', typically '[PATCH]', and
31-
then prepends "[PATCH] ". This flag forbids this
32-
munging, and is most useful when used to read back
33-
'git format-patch -k' output.
27+
Usually the program removes email cruft from the Subject:
28+
header line to extract the title line for the commit log
29+
message. This option prevents this munging, and is most
30+
useful when used to read back 'git format-patch -k' output.
31+
+
32+
Specifically, the following are removed until none of them remain:
33+
+
34+
--
35+
* Leading and trailing whitespace.
36+
37+
* Leading `Re:`, `re:`, and `:`.
38+
39+
* Leading bracketed strings (between `[` and `]`, usually
40+
`[PATCH]`).
41+
--
42+
+
43+
Finally, runs of whitespace are normalized to a single ASCII space
44+
character.
3445

3546
-b::
3647
When -k is not in effect, all leading strings bracketed with '['

0 commit comments

Comments
 (0)