* [PATCH] fix git format-patch --cc=<email> format
@ 2009-02-28 12:42 Peng Tao
2009-02-28 16:15 ` Jay Soffian
0 siblings, 1 reply; 5+ messages in thread
From: Peng Tao @ 2009-02-28 12:42 UTC (permalink / raw)
To: git; +Cc: gitster, Peng Tao
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');
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fix git format-patch --cc=<email> format
2009-02-28 12:42 [PATCH] fix git format-patch --cc=<email> format Peng Tao
@ 2009-02-28 16:15 ` Jay Soffian
2009-02-28 17:29 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Jay Soffian @ 2009-02-28 16:15 UTC (permalink / raw)
To: Peng Tao; +Cc: git, gitster
On Sat, Feb 28, 2009 at 7:42 AM, Peng Tao <bergwolf@gmail.com> wrote:
> 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.
This is fixed in next, but we fixed send-email instead to handle the
messages that format-patch generates, as they should be valid.
j.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix git format-patch --cc=<email> format
2009-02-28 16:15 ` Jay Soffian
@ 2009-02-28 17:29 ` Junio C Hamano
2009-03-01 1:01 ` Jeff King
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2009-02-28 17:29 UTC (permalink / raw)
To: Jay Soffian; +Cc: Peng Tao, git
Jay Soffian <jaysoffian@gmail.com> writes:
> On Sat, Feb 28, 2009 at 7:42 AM, Peng Tao <bergwolf@gmail.com> wrote:
>> 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.
>
> This is fixed in next, but we fixed send-email instead to handle the
> messages that format-patch generates, as they should be valid.
Per RFC2822 3.6 (pp 19-20), "cc" is to appear at most once (same is true
for "to" and "bcc"). I think fix to format-patch is necessary regardless
of what send-email does.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix git format-patch --cc=<email> format
2009-02-28 17:29 ` Junio C Hamano
@ 2009-03-01 1:01 ` Jeff King
2009-03-01 2:24 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2009-03-01 1:01 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jay Soffian, Peng Tao, git
On Sat, Feb 28, 2009 at 09:29:58AM -0800, Junio C Hamano wrote:
> >> 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.
> >
> > This is fixed in next, but we fixed send-email instead to handle the
> > messages that format-patch generates, as they should be valid.
>
> Per RFC2822 3.6 (pp 19-20), "cc" is to appear at most once (same is true
> for "to" and "bcc"). I think fix to format-patch is necessary regardless
> of what send-email does.
Then isn't the current format-patch output (folding the cc over
multiple lines) correct, and the patch (outputting multiple cc headers)
wrong?
-Peff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix git format-patch --cc=<email> format
2009-03-01 1:01 ` Jeff King
@ 2009-03-01 2:24 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2009-03-01 2:24 UTC (permalink / raw)
To: Jeff King; +Cc: Jay Soffian, Peng Tao, git
Jeff King <peff@peff.net> writes:
> On Sat, Feb 28, 2009 at 09:29:58AM -0800, Junio C Hamano wrote:
>
>> >> 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.
>> >
>> > This is fixed in next, but we fixed send-email instead to handle the
>> > messages that format-patch generates, as they should be valid.
>>
>> Per RFC2822 3.6 (pp 19-20), "cc" is to appear at most once (same is true
>> for "to" and "bcc"). I think fix to format-patch is necessary regardless
>> of what send-email does.
>
> Then isn't the current format-patch output (folding the cc over
> multiple lines) correct, and the patch (outputting multiple cc headers)
> wrong?
Ahh, sorry I misread what the commit message was saying and the patch was
doing.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-01 2:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 12:42 [PATCH] fix git format-patch --cc=<email> format Peng Tao
2009-02-28 16:15 ` 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
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).