summaryrefslogtreecommitdiff
path: root/contrib/mw-to-git
diff options
context:
space:
mode:
authorCélestin Matte <celestin.matte@ensimag.fr>2013-06-14 15:50:16 +0200
committerJunio C Hamano <gitster@pobox.com>2013-06-14 09:02:16 -0700
commiteb96b750394a78d9317f0a9224689f1ef50f04ec (patch)
tree0c09f39f1ae16f5b4a219e20146f565663a70a39 /contrib/mw-to-git
parent6c2fbe25fb8883da7925567a582dacda679e29dc (diff)
downloadgit-eb96b750394a78d9317f0a9224689f1ef50f04ec.tar.gz
git-remote-mediawiki: remove useless regexp modifier (m)
m// and // is used randomly. It is better to use the m modifier only when needed, e.g., when the regexp uses another separator than //. 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.perl6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 5e00833040..b65e71c120 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -761,7 +761,7 @@ sub get_more_refs {
my @refs;
while (1) {
my $line = <STDIN>;
- if ($line =~ m/^$cmd (.*)$/) {
+ if ($line =~ /^$cmd (.*)$/) {
push(@refs, $1);
} elsif ($line eq "\n") {
return @refs;
@@ -1167,11 +1167,11 @@ sub mw_push_revision {
my @local_ancestry = split(/\n/, run_git("rev-list --boundary --parents $local ^$parsed_sha1"));
my %local_ancestry;
foreach my $line (@local_ancestry) {
- if (my ($child, $parents) = $line =~ m/^-?([a-f0-9]+) ([a-f0-9 ]+)/) {
+ if (my ($child, $parents) = $line =~ /^-?([a-f0-9]+) ([a-f0-9 ]+)/) {
foreach my $parent (split(' ', $parents)) {
$local_ancestry{$parent} = $child;
}
- } elsif (!$line =~ m/^([a-f0-9]+)/) {
+ } elsif (!$line =~ /^([a-f0-9]+)/) {
die "Unexpected output from git rev-list: $line";
}
}