From: Junio C Hamano <junkio@cox.net>
To: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-send-email: Don't set author_not_sender from Cc: lines
Date: Tue, 22 Aug 2006 18:34:16 -0700 [thread overview]
Message-ID: <7vd5asjkvb.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 1156253919761-git-send-email-hskinnemoen@atmel.com
Haavard Skinnemoen <hskinnemoen@atmel.com> writes:
> 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.
> @@ -506,7 +506,7 @@ foreach my $t (@files) {
> if (/^Subject:\s+(.*)$/) {
> $subject = $1;
>
> - } elsif (/^(Cc|From):\s+(.*)$/) {
> + } elsif (/^(From):\s+(.*)$/) {
> if ($2 eq $from) {
> next if ($suppress_from);
> }
> @@ -516,8 +516,11 @@ foreach my $t (@files) {
> printf("(mbox) Adding cc: %s from line '%s'\n",
> $2, $_) unless $quiet;
> push @cc, $2;
> + } elsif (/^(Cc):\s+(.*)$/) {
> + printf("(mbox) Adding cc: %s from line '%s'\n",
> + $2, $_) unless $quiet;
> + push @cc, $2;
> }
> -
> } else {
> # In the traditional
> # "send lots of email" format,
The patch looks wrong. If your name is on CC: and you want to
suppress sending to yourself what happens?
How about doing something like this instead?
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",
next prev parent reply other threads:[~2006-08-23 1:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-22 13:38 [PATCH] git-send-email: Don't set author_not_sender from Cc: lines Haavard Skinnemoen
2006-08-23 1:34 ` Junio C Hamano [this message]
2006-08-23 9:14 ` Haavard Skinnemoen
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=7vd5asjkvb.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=hskinnemoen@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox