From: Matthieu Moy Date: Thu, 29 Nov 2012 16:57:51 GMT Subject: Re: [PATCH] git-remote-mediawiki: escape double quotes and LF in file names Message-ID: In-Reply-To: <7vy5hkqsut.fsf@alter.siamese.dyndns.org> 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 backslash; Nice catch, thanks. Also, I was lacking the double-quotes around $path. In my defense, I had only read the doc, not the code, and git-fast-import.txt was less complete than fast-import.c. New patch follows, fixing the doc too. -- Matthieu Moy http://www-verimag.imag.fr/~moy/