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

Re: fast-import fails in read-only tree

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Jan 30, 2016, 09:05 UTC
Message-ID
<m2oac31lp2.fsf@linux-m68k.org>
In-Reply-To
<20160130051340.GA1677@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> 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. It's a
> little tedious to allocate fifos, but something like:
With bash's coproc it's a bit less tedious:
Show 6 quoted lines
>   mkfifo in out
>   (exec git cat-file --batch <in >out) &
>   exec 8>in
>   exec 9<out
>   echo $sha >&8
>   read mode type size <&9
    coproc CAT_FILE git cat-file --batch
    echo $sha >&${CAT_FILE[1]}
    read mode type size <&${CAT_FILE[0]}
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Jeff KingNext: Stefan Monnier
Message 5 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.