summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0d08a5)
raw | patch | inline | side by side (parent: b0d08a5)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Mar 2006 07:43:52 +0000 (23:43 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Mar 2006 07:43:52 +0000 (23:43 -0800) |
git-send-email did not check 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>
patch author. Follow the "From: at the beginning" convention to
propagate the patch author correctly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 7c8d51223fd940d8e7ccfebe90046bf32f90e327..b220d11cc1e92e50b3c25460f84ab5db12a04da1 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
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;
$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;
}
}
close F;
+ if (defined $author_not_sender) {
+ $message = "From: $author_not_sender\n\n$message";
+ }
$cc = join(", ", unique_email_list(@cc));