git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Don't send copies to the From: address

From
CBChristian Biesinger <cbiesinger@web.de>
Date
Feb 11, 2006, 02:47 UTC
Message-ID
<11396260373307-git-send-email-cbiesinger@web.de>

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
Next: Junio C Hamano
Message 1 of 6 in “Don't send copies to the From: address”
  1. Don't send copies to the From: addressChristian Biesinger, Feb 11, 2006
  2. Junio C HamanoFeb 11, 2006
  3. Greg KHFeb 11, 2006
  4. Christian BiesingerFeb 11, 2006
  5. Christian BiesingerFeb 11, 2006
  6. Ryan AndersonFeb 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.