Re: [PATCH] Allow cloning an empty repository
- From
Miklos Vajna <vmiklos@frugalware.org>
- Date
- Jan 23, 2009, 23:05 UTC
- Message-ID
- <20090123230520.GL21473@genesis.frugalware.org>
- In-Reply-To
- <alpine.DEB.1.00.0901230333060.3586@pacific.mpi-cbg.de>
On Fri, Jan 23, 2009 at 03:42:24AM +0100, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 12 quoted lines
> > > I am mostly worried about a failure case (connected but couldn't get > > > the refs, or perhaps connection failed to start). If you get a NULL > > > in such a case you may end up saying "oh you cloned a void" when you > > > should say "nah, such a remote repository does not exist". > > > > Yes, this was my concern as well. > > From what I can see in get_remote_heads(), the native protocols would > die(), as would rsync(). > > HTTP transport, however, would not die() on connection errors, from my > cursory look.
I'm not familiar with the HTTP code, either, but here is the call stack I see:
- builtin-clone calls transport_get_remote_refs() - that will call transport->get_refs_list() - that will call get_refs_via_curl() - that die()s on error, does not use return error()
Have I missed something?