A "split ' '" is turned into a "split / /", which changes its behaviour: the
old method matched a run of whitespaces (/\s*/), while the new one will match a
single space, which is what we want here. Indeed, in other contexts,
changing split(' ') to split(/ /) could potentially be a regression, however,
here, when parsing the output of "rev-list --parents", whose output SHA-1's are
each separated by a single space, splitting on a single space is perfectly
correct.

Signed-off-by: Célestin Matte <celestin.ma...@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu....@grenoble-inp.fr>
---
 contrib/mw-to-git/git-remote-mediawiki.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl 
b/contrib/mw-to-git/git-remote-mediawiki.perl
index 7ce640f..7537305 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -1168,7 +1168,7 @@ sub mw_push_revision {
                my %local_ancestry;
                foreach my $line (@local_ancestry) {
                        if (my ($child, $parents) = $line =~ /^-?([a-f0-9]+) 
([a-f0-9 ]+)/) {
-                               foreach my $parent (split(' ', $parents)) {
+                               foreach my $parent (split(/ /, $parents)) {
                                        $local_ancestry{$parent} = $child;
                                }
                        } elsif (!$line =~ /^([a-f0-9]+)/) {
-- 
1.8.3.rc3.18.g21a7b2c

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to