git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Biesinger <cbiesinger@web.de>
To: git@vger.kernel.org
Subject: [PATCH] Don't send copies to the From: address
Date: Sat, 11 Feb 2006 03:47:17 +0100	[thread overview]
Message-ID: <11396260373307-git-send-email-cbiesinger@web.de> (raw)
In-Reply-To: 

Sending copies to the from address is pointless. Not
sending copies there makes it possible to do:

  git-format-patch --mbox origin
  git-send-email 00*

and get a reasonable result.

Signed-off-by: Christian Biesinger <cbiesinger@web.de>

---

 git-send-email.perl |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

486a15e29dff39ff5885d7a1e38d6c5c3b70127b
diff --git a/git-send-email.perl b/git-send-email.perl
index 3f1b3ca..31d23d6 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -304,9 +304,11 @@ foreach my $t (@files) {
 					$subject = $1;
 
 				} elsif (/^(Cc|From):\s+(.*)$/) {
-					printf("(mbox) Adding cc: %s from line '%s'\n",
-						$2, $_) unless $quiet;
-					push @cc, $2;
+					unless ($2 eq $from) {
+						printf("(mbox) Adding cc: %s from line '%s'\n",
+							$2, $_) unless $quiet;
+						push @cc, $2;
+					}
 				}
 
 			} else {
@@ -335,9 +337,11 @@ foreach my $t (@files) {
 			if (/^Signed-off-by: (.*)$/i) {
 				my $c = $1;
 				chomp $c;
-				push @cc, $c;
-				printf("(sob) Adding cc: %s from line '%s'\n",
-					$c, $_) unless $quiet;
+				unless ($c eq $from) {
+					push @cc, $c;
+					printf("(sob) Adding cc: %s from line '%s'\n",
+						$c, $_) unless $quiet;
+				}
 			}
 		}
 	}
-- 
1.1.6.g71f7-dirty

             reply	other threads:[~2006-02-11  2:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-11  2:47 Christian Biesinger [this message]
2006-02-11  3:55 ` [PATCH] Don't send copies to the From: address Junio C Hamano
2006-02-11  4:52   ` Greg KH
2006-02-11 12:33     ` Christian Biesinger
2006-02-11 12:31   ` Christian Biesinger
2006-02-13  7:20   ` Ryan Anderson

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=11396260373307-git-send-email-cbiesinger@web.de \
    --to=cbiesinger@web.de \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).