summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git
diff options
context:
space:
mode:
authorCélestin Matte <celestin.matte@ensimag.fr>2013-06-14 13:50:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-14 16:02:17 (GMT)
commit267055f8609ff3e3134765395569b87269699c0a (patch)
tree5d8e502ef012ede0878c5a04128924b222fb0c80 /contrib/mw-to-git
parent8f04f7ddd35331821666f7892c86956b6752de90 (diff)
downloadgit-267055f8609ff3e3134765395569b87269699c0a.zip
git-267055f8609ff3e3134765395569b87269699c0a.tar.gz
git-267055f8609ff3e3134765395569b87269699c0a.tar.bz2
git-remote-mediawiki: turn double-negated expressions into simple expressions
Signed-off-by: Célestin Matte <celestin.matte@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git')
-rwxr-xr-xcontrib/mw-to-git/git-remote-mediawiki.perl8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 1fcdf2d..68df6e4 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -131,16 +131,16 @@ while (<STDIN>) {
if (defined($cmd[0])) {
# Line not blank
if ($cmd[0] eq "capabilities") {
- die("Too many arguments for capabilities\n") unless (!defined($cmd[1]));
+ die("Too many arguments for capabilities\n") if (defined($cmd[1]));
mw_capabilities();
} elsif ($cmd[0] eq "list") {
- die("Too many arguments for list\n") unless (!defined($cmd[2]));
+ die("Too many arguments for list\n") if (defined($cmd[2]));
mw_list($cmd[1]);
} elsif ($cmd[0] eq "import") {
- die("Invalid arguments for import\n") unless ($cmd[1] ne "" && !defined($cmd[2]));
+ die("Invalid arguments for import\n") if ($cmd[1] eq "" || defined($cmd[2]));
mw_import($cmd[1]);
} elsif ($cmd[0] eq "option") {
- die("Too many arguments for option\n") unless ($cmd[1] ne "" && $cmd[2] ne "" && !defined($cmd[3]));
+ die("Too many arguments for option\n") if ($cmd[1] eq "" || $cmd[2] eq "" || defined($cmd[3]));
mw_option($cmd[1],$cmd[2]);
} elsif ($cmd[0] eq "push") {
mw_push($cmd[1]);