]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-send-email.perl: Really add angle brackets to In-Reply-To if necessary
authorMike Hommey <mh@glandium.org>
Sun, 9 Dec 2007 17:17:28 +0000 (18:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Dec 2007 20:18:37 +0000 (12:18 -0800)
3803bcea tried to fix this, but it only adds the branckes when the given
In-Reply-To begins and ends with whitespaces. It also didn't do anything
to the --in-reply-to argument.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index 76baa8e431e082c1e36eb9c78125094de0b8a85e..c0e1dd348c1f62029bb99b16cae290d2e4a77217 100755 (executable)
@@ -367,10 +367,11 @@ if ($thread && !defined $initial_reply_to && $prompting) {
        } while (!defined $_);
 
        $initial_reply_to = $_;
-       $initial_reply_to =~ s/^\s+<?/</;
-       $initial_reply_to =~ s/>?\s+$/>/;
 }
 
+$initial_reply_to =~ s/^\s*<?/</;
+$initial_reply_to =~ s/>?\s*$/>/;
+
 if (!defined $smtp_server) {
        foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
                if (-x $_) {