Re: [PATCH] git-remote-mediawiki: escape double quotes and LF in file names

2012-11-29 Thread Matthieu Moy
Junio C Hamano writes: >> +sub fe_escape_path { >> +my $path = shift; >> +$path =~ s/"/\\"/g; >> +$path =~ s/\n/\\n/g; >> +return $path; >> +} > > Is this sufficient? > > My reading of the big comment at the beginning of fast-import.c is > that you would also want to quote each ba

Re: [PATCH] git-remote-mediawiki: escape double quotes and LF in file names

2012-11-29 Thread Junio C Hamano
Matthieu Moy writes: > A mediawiki page can contain, and even start with a " character, we have > to escape it when generating the fast-export stream. While we're there, > also escape newlines, but I don't think we can get them from MediaWiki > pages. > > Signed-off-by: Matthieu Moy > --- > con

[PATCH] git-remote-mediawiki: escape double quotes and LF in file names

2012-11-29 Thread Matthieu Moy
A mediawiki page can contain, and even start with a " character, we have to escape it when generating the fast-export stream. While we're there, also escape newlines, but I don't think we can get them from MediaWiki pages. Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki |