Re: [PATCH] git-send-email: Don't set author_not_sender from Cc: lines

From: Haavard Skinnemoen <hskinnemoen@atmel.com>
Date: 2006-08-23 19:14:19
On Tue, 22 Aug 2006 18:34:16 -0700
Junio C Hamano <junkio@cox.net> wrote:

> The patch looks wrong.  If your name is on CC: and you want to
> suppress sending to yourself what happens?

It will still send it to you, I guess. The documentation only mentions
what happens with From: lines, so I wasn't really sure what behaviour is
expected...

> How about doing something like this instead?

Yeah, that's probably better. I just tested it by sending a mail to
myself, and it doesn't append an extra From: line, so it solves the
problem as far as I'm concerned.

Haavard

> diff --git a/git-send-email.perl b/git-send-email.perl
> index a83c7e9..8adb6b9 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -510,7 +510,7 @@ foreach my $t (@files) {
>  					if ($2 eq $from) {
>  						next if
> ($suppress_from); }
> -					else {
> +					elsif ($1 eq 'From') {
>  						$author_not_sender =
> $2; }
>  					printf("(mbox) Adding cc: %s
> from line '%s'\n",
> 
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Aug 23 19:15:05 2006

This archive was generated by hypermail 2.1.8 : 2006-08-23 19:16:11 EST