summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 6bbdfec849..172b53c2d5 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -608,7 +608,7 @@ EOT
sub ask {
my ($prompt, %arg) = @_;
- my $valid_re = $arg{valid_re} || ""; # "" matches anything
+ my $valid_re = $arg{valid_re};
my $default = $arg{default};
my $resp;
my $i = 0;
@@ -624,7 +624,7 @@ sub ask {
if ($resp eq '' and defined $default) {
return $default;
}
- if ($resp =~ /$valid_re/) {
+ if (!defined $valid_re or $resp =~ /$valid_re/) {
return $resp;
}
}