On Tue, Mar 14, 2017 at 08:48:50PM -0500, Artur Shepilko wrote:
> Just tried the case of "file name contains a newline char" with git.
> Looks like git encodes such names with C-like characters ('\n' for x0A
> or '\r' for x0D).
> 
> Git fast-export outputs such files enquoted as follows:
> M 100644 :1 "newline\nfile.txt"
> 
> For the same case, fossil export does not encode the control chars and
> just outputs such names directly:
> M 100644 :4 newline
> file.txt
> 
> I guess an extra encoding/decoding step is needed in fossil
> export/import. Perhaps this is not for practical but at least for
> compatibilty reasons.

And by following this:
  https://git-scm.com/docs/git-fast-import#git-fast-import-Inlinedataformat

It should be pretty straight forward. Only \n, \\ and \" character needs
to be escaped and if 1 of them is present, the filename must be
surrounded by double-quotes. 

I'm very busy now, so if someone doesn't beat me on this, I might try
to implement this later.


Regards,

-- 
Martin G.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to