git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: git@vger.kernel.org
Subject: Re: git send-email woes
Date: Mon, 25 Sep 2006 12:58:21 -0700	[thread overview]
Message-ID: <7v7izrzpk2.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060925183221.GE2490@uranus.ravnborg.org> (Sam Ravnborg's message of "Mon, 25 Sep 2006 20:32:21 +0200")

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

  reply	other threads:[~2006-09-25 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-24 22:43 git send-email woes Sam Ravnborg
2006-09-25 18:32 ` Sam Ravnborg
2006-09-25 19:58   ` Junio C Hamano [this message]
2006-09-25 21:17     ` David Miller
2006-09-25 21:51     ` Sam Ravnborg
2006-09-26  4:11       ` Junio C Hamano

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=7v7izrzpk2.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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).