* Add backslash to list of 'crud' characters in real name
@ 2008-12-01 16:41 Linus Torvalds
0 siblings, 0 replies; only message in thread
From: Linus Torvalds @ 2008-12-01 16:41 UTC (permalink / raw)
To: Junio C Hamano, Git Mailing List
We remove crud characters at the beginning and end of real-names so that
when we see email addresses like
From: "David S. Miller" <davem@davemloft.net>
we drop the quotes around the name when we parse that and split it up into
name and email.
However, the list of crud characters was basically just a random list of
common things that are found around names, and it didn't contain the
backslash character that some insane scripts seem to use when quoting
things. So now the kernel has a number of authors listed like
Author: \"Rafael J. Wysocki\ <rjw@sisk.pl>
because the author name had started out as
From: \"Rafael J. Wysocki\" <rjw@sisk.pl>
and the only "crud" character we noticed and removed was the final
double-quote at the end.
We should probably do better quote removal from names anyway, but this is
the minimal obvious patch.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
ident.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ident.c b/ident.c
index 09cf0c9..99f1c85 100644
--- a/ident.c
+++ b/ident.c
@@ -121,6 +121,7 @@ static int crud(unsigned char c)
c == '<' ||
c == '>' ||
c == '"' ||
+ c == '\\' ||
c == '\'';
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-01 16:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 16:41 Add backslash to list of 'crud' characters in real name Linus Torvalds
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).