git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: email address handling

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 2, 2008, 11:31 UTC
Message-ID
<alpine.DEB.1.00.0808021321500.9611@pacific.mpi-cbg.de.mpi-cbg.de>
In-Reply-To
<alpine.LFD.1.10.0808011608150.6819@nehalem.linux-foundation.org>
Hi,
On Fri, 1 Aug 2008, Linus Torvalds wrote:
Show 6 quoted lines
> The thing is, you can actually get git to output the crazy names. Just 
> do
> 
> 	git show --pretty=email 37a4c940749670671adab211a2d9c9fed9f3f757
> 
> and now you get the email-prettified thing for at least the author.

Ah, there lies the rub (you forgot that the original complaint was about a comma, and pretty=email does not handle those):

-- snipsnap --
 pretty.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pretty.c b/pretty.c
index 33ef34a..9db0333 100644
--- a/pretty.c
+++ b/pretty.c
@@ -79,7 +79,8 @@ int non_ascii(int ch)
 
 static int is_rfc2047_special(char ch)
 {
-	return (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_'));
+	return (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_') ||
+		(ch == ',') || (ch == '"') || (ch == '\''));
 }
 
 static void add_rfc2047(struct strbuf *sb, const char *line, int len,
@@ -89,7 +90,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,
 
 	for (i = 0; i < len; i++) {
 		int ch = line[i];
-		if (non_ascii(ch))
+		if (is_rfc2047_special(ch))
 			goto needquote;
 		if ((i + 1 < len) && (ch == '=' && line[i+1] == '?'))
 			goto needquote;
Previous: Linus TorvaldsNext: Linus Torvalds
Message 30 of 41 in “email address handling”
  1. Andrew MortonAug 1, 2008
  2. Linus TorvaldsAug 1, 2008
  3. Andrew MortonAug 1, 2008
  4. Linus TorvaldsAug 1, 2008
  5. Junio C HamanoAug 1, 2008
  6. Andrew MortonAug 1, 2008
  7. Linus TorvaldsAug 1, 2008
  8. Andrew MortonAug 1, 2008
  9. Linus TorvaldsAug 1, 2008
  10. Linus TorvaldsAug 1, 2008
  11. Andrew MortonAug 1, 2008
  12. Linus TorvaldsAug 1, 2008
  13. Johannes SchindelinAug 1, 2008
  14. Junio C HamanoAug 1, 2008
  15. Johannes SchindelinAug 2, 2008
  16. Junio C HamanoAug 1, 2008
  17. Andrew MortonAug 1, 2008
  18. Theodore TsoAug 1, 2008
  19. Andrew MortonAug 1, 2008
  20. Linus TorvaldsAug 1, 2008
  21. Andrew MortonAug 1, 2008
  22. Linus TorvaldsAug 1, 2008
  23. Andrew MortonAug 1, 2008
  24. Linus TorvaldsAug 1, 2008
  25. Karl HasselströmAug 4, 2008
  26. Linus TorvaldsAug 1, 2008
  27. Andrew MortonAug 1, 2008
  28. Linus TorvaldsAug 1, 2008
  29. Linus TorvaldsAug 1, 2008
  30. Johannes SchindelinAug 2, 2008
  31. Linus TorvaldsAug 2, 2008
  32. Junio C HamanoAug 2, 2008
  33. Johannes SchindelinAug 2, 2008
  34. Linus TorvaldsAug 2, 2008
  35. Junio C HamanoAug 2, 2008
  36. Junio C HamanoAug 2, 2008
  37. Junio C HamanoAug 2, 2008
  38. Linus TorvaldsAug 1, 2008
  39. Andrew MortonAug 1, 2008
  40. Junio C HamanoAug 1, 2008
  41. Andrew MortonAug 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.