From: Haavard Skinnemoen Date: Wed, 23 Aug 2006 10:02:59 +0000 (-0700) Subject: git-send-email: Don't set author_not_sender from Cc: lines X-Git-Tag: v1.4.3-rc1~211 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=68d42c41ef33cde500307660bb64a1c74f62711e;p=git.git git-send-email: Don't set author_not_sender from Cc: lines When an mbox-style patch contains a Cc: line in the header, git-send-email will check the address against the sender specified on the command line. If they don't match, sender_not_author will be set to the address obtained from the Cc line. When this happens, git-send-email inserts a From: line at the beginning of the message body with the address obtained from the Cc line in the header, and the sender might be accused of forging patch authors. This patch fixes this by only updating sender_not_author when processing From: lines, not when processing Cc: lines. Signed-off-by: Haavard Skinnemoen Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index a83c7e909..746c52507 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",