git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: greg@kroah.com
Cc: git@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: Fw: [PATCH 31/49] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix
Date: Thu, 23 Mar 2006 18:27:15 -0800	[thread overview]
Message-ID: <7v3bh837cs.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060323175126.7ff71032.akpm@osdl.org> (Andrew Morton's message of "Thu, 23 Mar 2006 17:51:26 -0800")

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));
 

  reply	other threads:[~2006-03-24  2:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060323161521.28a874e6.akpm@osdl.org>
     [not found] ` <20060324002930.GA21184@kroah.com>
     [not found]   ` <20060323163844.5fda7589.akpm@osdl.org>
2006-03-24  0:46     ` Fw: [PATCH 31/49] PCI: PCI/Cardbus cards hidden, needs pci=assign-busses to fix Greg KH
2006-03-24  0:55       ` Greg KH
2006-03-24  1:26       ` Junio C Hamano
2006-03-24  1:51         ` Andrew Morton
2006-03-24  2:27           ` Junio C Hamano [this message]
2006-03-24  6:17             ` Greg KH
2006-03-24  7:44               ` Junio C Hamano
2006-03-24 17:23             ` 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=7v3bh837cs.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=akpm@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=greg@kroah.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;
as well as URLs for NNTP newsgroup(s).