Skip to content

Commit

Permalink
Merge branch 'bn/send-email-smtp-auth-error-message-fix'
Browse files Browse the repository at this point in the history
Fix a minor regression brought in to "git send-email" by a recent
addition of the "--smtp-auth" option.

* bn/send-email-smtp-auth-error-message-fix:
  send-email: fix uninitialized var warning for $smtp_auth
  • Loading branch information
Junio C Hamano committed Sep 21, 2015
2 parents e646ab9 + 904f6e7 commit b6bd2d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ sub smtp_auth_maybe {

# Check mechanism naming as defined in:
# https://tools.ietf.org/html/rfc4422#page-8
if ($smtp_auth !~ /^(\b[A-Z0-9-_]{1,20}\s*)*$/) {
if ($smtp_auth && $smtp_auth !~ /^(\b[A-Z0-9-_]{1,20}\s*)*$/) {
die "invalid smtp auth: '${smtp_auth}'";
}

Expand Down

0 comments on commit b6bd2d0

Please sign in to comment.