Hi,

On Mon, Oct 10, 2016 at 02:32:51PM +0900, Osamu Aoki wrote:
> On Mon, Oct 10, 2016 at 10:38:45AM +0900, Osamu Aoki wrote:
> ...
> > commit refs/heads/test_ticket_d17d6e5b17
> > mark :37455
> > committer jan.nijtmans <jan.nijtmans> 1353531216 +0000
> > data 82
> > Just commit some weird filenames, even one with a newline in it, to
>                                                     ^^^^^^^
> > test the code.
>   ^^^^^^^^^^^^^
> 
> Now I realize.
> 
> > from :37577
> > M 100644 :1050 :abc
> > M 100644 :37588 abc
> > def.txt
> 
> I see this should have been "abc\ndef.txt" instead of "abc", real NL
> and "def.txt".
> 
> I tested "git fast-export" with filename with NL in it.
...

I made a proof of concept patch for export after reading the git code
and it works OK.  (Escaping is not just " " and control code.  It also
escaped UTF-8 high bit codes.)

$ fossil export --git ../fossil.fsl | git fast-import
error: Multiple updates for ref 'refs/tags/json_add_tag_test' not allowed.
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects:      55000
Total objects:        50520 (      2996 duplicates                  )
      blobs  :        19491 (         0 duplicates      15079 deltas of      
18632 attempts)
      trees  :        21041 (      2996 duplicates      18791 deltas of      
19186 attempts)
      commits:         9915 (         0 duplicates          0 deltas of         
 0 attempts)
      tags   :           73 (         0 duplicates          0 deltas of         
 0 attempts)
Total branches:         556 (       982 loads     )
      marks:        1048576 (     29406 unique    )
      atoms:            935
Memory total:          4813 KiB
       pools:          2235 KiB
     objects:          2578 KiB
---------------------------------------------------------------------
pack_report: getpagesize()            =       4096
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit      = 8589934592
pack_report: pack_used_ctr            =       6615
pack_report: pack_mmap_calls          =       1725
pack_report: pack_open_windows        =          1 /          1
pack_report: pack_mapped              =  115842232 /  115842232
---------------------------------------------------------------------

I have no idea for "error: Multiple updates for ref ..." but at least
git repo is usable one after executing "git checkout trunk".

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