Code

send-email: do not muck with initial-reply-to when unset.
authorJunio C Hamano <gitster@pobox.com>
Tue, 11 Dec 2007 05:44:42 +0000 (21:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Dec 2007 08:38:46 +0000 (00:38 -0800)
When not prompting, initial_reply_to can be left unset.  Do not try to
sanitize it and get useless warning.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl

index c0e1dd348c1f62029bb99b16cae290d2e4a77217..1d6f46645328dc2520226aba532c4acb86f5ec32 100755 (executable)
@@ -368,9 +368,10 @@ if ($thread && !defined $initial_reply_to && $prompting) {
 
        $initial_reply_to = $_;
 }
-
-$initial_reply_to =~ s/^\s*<?/</;
-$initial_reply_to =~ s/>?\s*$/>/;
+if (defined $initial_reply_to && $_ ne "") {
+       $initial_reply_to =~ s/^\s*<?/</;
+       $initial_reply_to =~ s/>?\s*$/>/;
+}
 
 if (!defined $smtp_server) {
        foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {