Re: [PATCH v3 09/28] git-remote-mediawiki: Change the behaviour of a split

2013-06-10 Thread Matthieu Moy
Célestin Matte celestin.ma...@ensimag.fr writes:

 A split ' ' is turned into a split / /, which changes its behaviour: the
 old method matched a run of whtespaces (/\s*/)

It case there's a v4: whtespaces - whitespaces.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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


[PATCH v3 09/28] git-remote-mediawiki: Change the behaviour of a split

2013-06-09 Thread Célestin Matte
A split ' ' is turned into a split / /, which changes its behaviour: the
old method matched a run of whtespaces (/\s*/), while the new one will match a
single whitespace, 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.7.9.5

--
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