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

Re: fast-import fails in read-only tree

From
SMStefan Monnier <monnier@iro.umontreal.ca>
Date
Jan 30, 2016, 13:56 UTC
Message-ID
<jwvtwlv18jw.fsf-monnier+gmane.comp.version-control.git@gnu.org>
In-Reply-To
<20160130051340.GA1677@sigill.intra.peff.net>
> You can use custom cat-file formatting to output your "name" strings as
> part of the same field. IOW, something like:
[...]
> If you're really going to do a lot of interactive back-and-forth access
> of objects, though, I think you want to set up pipes to cat-file.

OMG, I didn't realize that cat-file doesn't buffer its output so it can be read&write to/from the same process. And the "%(rest)" thingy takes care of the rest of my needs, indeed.

Thanks!
> It's a little tedious to allocate fifos, but something like:
That's not a problem.
Show 9 quoted lines
> One feature I do think would be useful (and almost implemented when I
> added --batch-check=<format>) is a formatter for the object content,
> with a pretty modifier. I.e., it would be nice to do:
>
>   echo $some_tree |
>   git cat-file --batch-check="%(objectsize:pretty) %(contents:pretty)"
>
> to work as the rough equivalent of "git cat-file -p" (but here you could
> feed multiple trees and get multiple answers).
Yes, that would be a good improvement,
        Stefan
Previous: Andreas Schwab
Message 6 of 6 in “fast-import fails in read-only tree”
  1. Stefan MonnierJan 28, 2016
  2. Jeff KingJan 29, 2016
  3. Stefan MonnierJan 29, 2016
  4. Jeff KingJan 30, 2016
  5. Andreas SchwabJan 30, 2016
  6. Stefan MonnierJan 30, 2016

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.