Re: [PATCH] Allow cloning an empty repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Fri, 23 Jan 2009, Sverre Rabbelier wrote:

> On Fri, Jan 23, 2009 at 02:24, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > I think the basic idea is Ok, but is it a reliable check at this point to
> > see if (refs == NULL) to tell if the target repository is an empty one?
> 
> This is the question I asked Dscho, and he said/guessed that it was.
> 
> > 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.

That might be skewed, though, as I am on top of Mike's patches (in the 
hopefully not so futile hope that Mike -- after letting me wait for over 
one year -- finishes his work.

HTTP being 2nd class citizen anyway (and we can always fix it after Mike's 
cleanups), I'd say this patch is ready to roll.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux