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

Re: Fw: [PATCH 31/49] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix

From
Junio C Hamano <junkio@cox.net>
Date
Mar 24, 2006, 02:27 UTC
Message-ID
<7v3bh837cs.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060323175126.7ff71032.akpm@osdl.org>
Andrew Morton <akpm@osdl.org> writes:
> We wouldn't want to attempt to mix this concept up with email envelopes or
> email headers or anything like that.  The authorship is an attribute of the
> patch, and has nothing to do with how it was transported, stored or
> anything like that.

Fair enough. This is the approach I called "the second best" in my message but I am inclined to agree with you.

This was tested once by sending myself two patches.

-- >8 -- [PATCH] send-email: Identify author at the top when sending e-mail

git-send-email was not checking if the sender is the same as the patch author. Follow the "From: at the beginning" convention to propagate the patch author correctly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/git-send-email.perl b/git-send-email.perl
index 7c8d512..b220d11 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -307,6 +307,7 @@ $subject = $initial_subject;
 foreach my $t (@files) {
 	open(F,"<",$t) or die "can't open file $t";
 
+	my $author_not_sender = undef;
 	@cc = @initial_cc;
 	my $found_mbox = 0;
 	my $header_done = 0;
@@ -321,7 +322,12 @@ foreach my $t (@files) {
 					$subject = $1;
 
 				} elsif (/^(Cc|From):\s+(.*)$/) {
-					next if ($2 eq $from && $suppress_from);
+					if ($2 eq $from) {
+						next if ($suppress_from);
+					}
+					else {
+						$author_not_sender = $2;
+					}
 					printf("(mbox) Adding cc: %s from line '%s'\n",
 						$2, $_) unless $quiet;
 					push @cc, $2;
@@ -360,6 +366,9 @@ foreach my $t (@files) {
 		}
 	}
 	close F;
+	if (defined $author_not_sender) {
+		$message = "From: $author_not_sender\n\n$message";
+	}
 
 	$cc = join(", ", unique_email_list(@cc));
 
Previous: Andrew MortonNext: Greg KH
Message 5 of 8 in “Re: Fw: [PATCH 31/49] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix”
  1. Greg KHMar 24, 2006
  2. Greg KHMar 24, 2006
  3. Junio C HamanoMar 24, 2006
  4. Andrew MortonMar 24, 2006
  5. Junio C HamanoMar 24, 2006
  6. Greg KHMar 24, 2006
  7. Junio C HamanoMar 24, 2006
  8. Ryan AndersonMar 24, 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.