remote-mediawiki: allow fetching namespaces with spaces
authorIngo Ruhnke <grumbel@gmail.com>
Mon, 6 Nov 2017 21:19:48 +0000 (16:19 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Nov 2017 00:45:55 +0000 (09:45 +0900)
we still want to use spaces as separators in the config, but we should
allow the user to specify namespaces with spaces, so we use underscore
for this.

Reviewed-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Antoine Beaupré <anarcat@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/mw-to-git/git-remote-mediawiki.perl
index 5ffb57595324bd9ff9c9118c82d7c210ba565387..a1d7837891e35640c6cd7f31161fc498f109c9a5 100755 (executable)
@@ -65,6 +65,7 @@
 
 # Just like @tracked_categories, but for MediaWiki namespaces.
 my @tracked_namespaces = split(/[ \n]/, run_git("config --get-all remote.${remotename}.namespaces"));
+for (@tracked_namespaces) { s/_/ /g; }
 chomp(@tracked_namespaces);
 
 # Import media files on pull