git/list[1] front-page[2] threads[3] people[4] search[5] about
 

fast-import interface issues

From
EMElliott Mitchell <ehem+git-scm@m5p.com>
Date
Apr 11, 2024, 22:18 UTC
Message-ID
<ZhhhmvjuYfWc535m@mattapan.m5p.com>

I've ended up trying to use `git fast-import` for a task and have ended up observing issues with the current interface.

First item, why is there no -0 option? Due to any string being a valid filename, most Unix utilities have evolved a -0 option (sometimes other characters). `find -print0`, `xargs -0`, `grep -z`, `grep -Z`, `tar -T --null`. Yet there is no `git fast-import -0`. I suspect this could work better with unusual filenames.

Second, forced use of quotes for 'ls' SP <path> LF seems a poor choice. Using the empty string as a dataref or the mark of the WIP commit seem better choices. In particular 'ls' SP SP <path> \0 could be readily distinguished from a sha1 or other existing data references.

Third, why is 'cat-blob' limited to blob data? `cat-file --batch` isn't limited to blobs, so why is `fast-import`'s equivalent so limited?

Alas, I'm already involved in too many things at once and cannot hope to implement these myself. Yet they do seem obvious limitations in what `git fast-import` can be used for.

-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg@m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
Message 1 of 1 in “fast-import interface issues”
  1. Elliott MitchellApr 11, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.