{"thread":{"id":"61311","subject":"fast-import interface issues","startedAt":"2024-04-11T22:33:50Z","lastAt":"2024-04-11T22:33:50Z","messageCount":1,"participants":["Elliott Mitchell"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"492811","messageId":"ZhhhmvjuYfWc535m@mattapan.m5p.com","threadId":"61311","inReplyTo":null,"subject":"fast-import interface issues","fromName":"Elliott Mitchell","fromEmail":"ehem+git-scm@m5p.com","sentAt":"2024-04-11T22:18:02Z","receivedAt":"2024-04-11T22:33:50Z","isPatch":false,"sender":{"key":"ehem+git-scm@m5p.com","avatar":null},"body":"I've ended up trying to use `git fast-import` for a task and have ended\nup observing issues with the current interface.\n\nFirst item, why is there no -0 option?  Due to any string being a valid\nfilename, most Unix utilities have evolved a -0 option (sometimes other\ncharacters).  `find -print0`, `xargs -0`, `grep -z`, `grep -Z`,\n`tar -T --null`.  Yet there is no `git fast-import -0`.  I suspect this\ncould work better with unusual filenames.\n\nSecond, forced use of quotes for 'ls' SP <path> LF seems a poor choice.\nUsing the empty string as a dataref or the mark of the WIP commit seem\nbetter choices.  In particular 'ls' SP SP <path> \\0 could be readily\ndistinguished from a sha1 or other existing data references.\n\nThird, why is 'cat-blob' limited to blob data?  `cat-file --batch` isn't\nlimited to blobs, so why is `fast-import`'s equivalent so limited?\n\nAlas, I'm already involved in too many things at once and cannot hope to\nimplement these myself.  Yet they do seem obvious limitations in what\n`git fast-import` can be used for.\n\n\n-- \n(\\___(\\___(\\______          --=> 8-) EHM <=--          ______/)___/)___/)\n \\BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /\n  \\_CS\\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/\n8A19\\___\\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\\_|_/___/5445\n\n\n"}]}