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

[PATCH] fix git format-patch --cc=<email> format

From
PTPeng Tao <bergwolf@gmail.com>
Date
Feb 28, 2009, 12:42 UTC
Message-ID
<1235824944-4967-1-git-send-email-bergwolf@gmail.com>
If there are multiple --cc=<email> arguments, git format-patch will generate
patches with cc lines like:
  Cc: <email>,
      <email>
which git send-email fails to parse.
git send-email only accept formats like:
  Cc: <email>
  Cc: <email>
So change git format-patch to generate patches in a proper format.
Signed-off-by: Peng Tao <bergwolf@gmail.com>
---
 builtin-log.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 60f8dd8..22bb6b6 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -907,13 +907,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 	}
 
 	if (extra_cc_nr)
-		strbuf_addstr(&buf, "Cc: ");
 	for (i = 0; i < extra_cc_nr; i++) {
-		if (i)
-			strbuf_addstr(&buf, "    ");
+		strbuf_addstr(&buf, "Cc: ");
 		strbuf_addstr(&buf, extra_cc[i]);
-		if (i + 1 < extra_cc_nr)
-			strbuf_addch(&buf, ',');
 		strbuf_addch(&buf, '\n');
 	}
 
Next: Jay Soffian
Message 1 of 5 in “fix git format-patch --cc=<email> format”
  1. fix git format-patch --cc=<email> formatPeng Tao, Feb 28, 2009
  2. Jay SoffianFeb 28, 2009
  3. Junio C HamanoFeb 28, 2009
  4. Jeff KingMar 1, 2009
  5. Junio C HamanoMar 1, 2009

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.