Subject: Re: fast-import fails in read-only tree

From: Andreas Schwab <[email-masked]>
Date: Sat, 30 Jan 2016 10:05:45 +0100

Jeff King <[email-masked]> 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:

>   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, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."