git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mailinfo documentation: accurately describe non -k case
@ 2012-01-11 20:13 Thomas Rast
  2012-01-11 20:13 ` [PATCH 2/3] am: learn passing -b to mailinfo Thomas Rast
  2012-01-11 20:13 ` [PATCH 3/3] mailinfo: with -b, keep space after [foo] Thomas Rast
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Rast @ 2012-01-11 20:13 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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 <trast@student.ethz.ch>
---
 Documentation/git-mailinfo.txt |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt
index 51dc325..97e7a8e 100644
--- a/Documentation/git-mailinfo.txt
+++ b/Documentation/git-mailinfo.txt
@@ -25,13 +25,24 @@ command directly.  See linkgit:git-am[1] instead.
 OPTIONS
 -------
 -k::
-	Usually the program 'cleans up' the Subject: header line
-	to extract the title line for the commit log message,
-	among which (1) remove 'Re:' or 're:', (2) leading
-	whitespaces, (3) '[' up to ']', typically '[PATCH]', and
-	then prepends "[PATCH] ".  This flag forbids this
-	munging, and is most useful when used to read back
-	'git format-patch -k' output.
+	Usually the program removes email cruft from the Subject:
+	header line to extract the title line for the commit log
+	message.  This option prevents this munging, and is most
+	useful when used to read back 'git format-patch -k' output.
++
+Specifically, the following are removed until none of them remain:
++
+--
+*	Leading and trailing whitespace.
+
+*	Leading `Re:`, `re:`, and `:`.
+
+*	Leading bracketed strings (between `[` and `]`, usually
+	`[PATCH]`).
+--
++
+Finally, runs of whitespace are normalized to a single ASCII space
+character.
 
 -b::
 	When -k is not in effect, all leading strings bracketed with '['
-- 
1.7.9.rc0.168.g3847c

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-20 13:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11 20:13 [PATCH 1/3] mailinfo documentation: accurately describe non -k case Thomas Rast
2012-01-11 20:13 ` [PATCH 2/3] am: learn passing -b to mailinfo Thomas Rast
2012-01-12  1:35   ` Junio C Hamano
2012-01-12  8:52     ` Thomas Rast
2012-01-16 10:53       ` [PATCH v2 1/2] " Thomas Rast
2012-01-16 10:53         ` [PATCH v2 2/2] mailinfo: with -b, keep space after [foo] Thomas Rast
2012-01-19 21:26         ` [PATCH v2 1/2] am: learn passing -b to mailinfo Junio C Hamano
2012-01-20 13:04           ` Thomas Rast
2012-01-11 20:13 ` [PATCH 3/3] mailinfo: with -b, keep space after [foo] Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).