提交 d404bf02 编写于 作者: L Linus Torvalds 提交者: Junio C Hamano

Add backslash to list of 'crud' characters in real name

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: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 46059cc6
......@@ -121,6 +121,7 @@ static int crud(unsigned char c)
c == '<' ||
c == '>' ||
c == '"' ||
c == '\\' ||
c == '\'';
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册