Skip to content

Commit ace9c2a

Browse files
committed
send-email: do not muck with initial-reply-to when unset.
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>
1 parent 28072a5 commit ace9c2a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git-send-email.perl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,10 @@ sub expand_aliases {
368368

369369
$initial_reply_to = $_;
370370
}
371-
372-
$initial_reply_to =~ s/^\s*<?/</;
373-
$initial_reply_to =~ s/>?\s*$/>/;
371+
if (defined $initial_reply_to && $_ ne "") {
372+
$initial_reply_to =~ s/^\s*<?/</;
373+
$initial_reply_to =~ s/>?\s*$/>/;
374+
}
374375

375376
if (!defined $smtp_server) {
376377
foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {

0 commit comments

Comments
 (0)