Re: Clone fails on a repo with too many heads/tags
- From
Jeff King <peff@peff.net>
- Date
- Mar 19, 2012, 02:32 UTC
- Message-ID
- <20120319023231.GA10426@sigill.intra.peff.net>
- In-Reply-To
- <201203182307.43599.jnareb@gmail.com>
On Sun, Mar 18, 2012 at 11:07:42PM +0100, Jakub Narebski wrote:
Show 12 quoted lines
> > I think the only sane solution is to write the values to a temporary > > file, and do something like: > > > > git fetch-pack --stateless-rpc --refs-from=$tmpfile > > > > Even if you put the tmpfile in $GIT_DIR, I don't think this should run > > afoul of any read-only repositories, since by definition you are > > fetching into the repository (but you could also just put it in /tmp). > > git fetch-pack --stateless-rpc --refs-fd=$n > > and there would be no need for temporary file.
Yeah. That is a slightly more awkward interface for command-line users, but this is really meant to be an internal-to-git thing (just like stateless-rpc is in the first place). And avoiding a tempfile is a good thing.
However, I think you would need to teach the run-command API how to open extra pipes to a child beyond stdout/stdin/stderr.
-Peff