Booleans such as &&, ||, ! have higher precedence than and, or, not.
They should not be mixed.
Signed-off-by: Bill Pemberton <redacted>
---
git-send-email.perl | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index c24e0df..5e7295d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -471,14 +471,14 @@ while (defined(my $f = shift @ARGV)) {
if ($f eq "--") {
push @rev_list_opts, "--", @ARGV;
@ARGV = ();
- } elsif (-d $f and !check_file_rev_conflict($f)) {
+ } elsif (-d $f && !check_file_rev_conflict($f)) {
opendir(DH,$f)
or die "Failed to opendir $f: $!";
push @files, grep { -f $_ } map { +$f . "/" . $_ }
sort readdir(DH);
closedir(DH);
- } elsif ((-f $f or -p $f) and !check_file_rev_conflict($f)) {
+ } elsif ((-f $f || -p $f) && !check_file_rev_conflict($f)) {
push @files, $f;
} else {
push @rev_list_opts, $f;@@ -632,7 +632,7 @@ sub ask {
if ($resp eq '' and defined $default) {
return $default;
}
- if (!defined $valid_re or $resp =~ /$valid_re/) {
+ if (!defined $valid_re || $resp =~ /$valid_re/) {
return $resp;
}
}--
1.6.0.6