All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Jeff King <peff@peff.net>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, git@vger.kernel.org
Subject: Re: fast-import fails in read-only tree
Date: Sat, 30 Jan 2016 10:05:45 +0100	[thread overview]
Message-ID: <m2oac31lp2.fsf@linux-m68k.org> (raw)
In-Reply-To: <20160130051340.GA1677@sigill.intra.peff.net> (Jeff King's message of "Sat, 30 Jan 2016 00:13:40 -0500")

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:

>   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."

  reply	other threads:[~2016-01-30  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 22:17 fast-import fails in read-only tree Stefan Monnier
2016-01-29  6:08 ` Jeff King
2016-01-29 14:28   ` Stefan Monnier
2016-01-30  5:13     ` Jeff King
2016-01-30  9:05       ` Andreas Schwab [this message]
2016-01-30 13:56       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2oac31lp2.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.