Re: git send-email woes
- From
Sam Ravnborg <sam@ravnborg.org>
- Date
- Sep 25, 2006, 21:51 UTC
- Message-ID
- <20060925215127.GA3965@uranus.ravnborg.org>
- In-Reply-To
- <7v7izrzpk2.fsf@assigned-by-dhcp.cox.net>
On Mon, Sep 25, 2006 at 12:58:21PM -0700, Junio C Hamano wrote:
Show 28 quoted lines
> Sam Ravnborg <sam@ravnborg.org> writes:
>
> > The patches in quistion did not have a "Signed-off-by: tag so
> > that mail address has been from the author instead.
> > And this mail address was still invalid as per RFC2822.
>
> I do not think it takes Signed-off-by: as author in any case
> (and I do not think it should -- if it did so it is a bug).
>
> Maybe something like this?
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 746c525..b4a34f4 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -431,6 +431,11 @@ sub send_message
> $gitversion =~ s/^.* //;
> }
>
> + my ($author_name) = ($from =~ /^(.*?)\s+</);
> + if ($author_name =~ /\./ && $author_name !~ /^".*"$/) {
> + my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
> + $from = "\"$name\"$addr";
> + }
> my $header = "From: $from
> To: $to
> Cc: $cc
> I would assume we had to do the same for all mail addresses? In this case also for $to and $cc and $reply_to.
Sam