All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, Peng Tao <bergwolf@gmail.com>
Subject: [PATCH] fix git format-patch --cc=<email> format
Date: Sat, 28 Feb 2009 20:42:24 +0800	[thread overview]
Message-ID: <1235824944-4967-1-git-send-email-bergwolf@gmail.com> (raw)

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');
 	}
 

             reply	other threads:[~2009-02-28 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-28 12:42 Peng Tao [this message]
2009-02-28 16:15 ` [PATCH] fix git format-patch --cc=<email> format Jay Soffian
2009-02-28 17:29   ` Junio C Hamano
2009-03-01  1:01     ` Jeff King
2009-03-01  2:24       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1235824944-4967-1-git-send-email-bergwolf@gmail.com \
    --to=bergwolf@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.