git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Barkalow <barkalow@iabervon.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Fix "git clone" for git:// protocol
Date: Sat, 9 Feb 2008 12:16:04 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.1.00.0802091205530.13593@iabervon.org> (raw)
In-Reply-To: <alpine.LSU.1.00.0802091657000.11591@racer.site>

On Sat, 9 Feb 2008, Johannes Schindelin wrote:

> In the commit "Reduce the number of connects when fetching", we checked 
> the return value of git_connect() to see if the connection was successful.
> 
> However, for the git:// protocol, there is no need to have another 
> process, so the return value is NULL.
> 
> The thing is: git_connect() does not return at all if it fails, so we need 
> not check the return value of git_connect().

Huh. Sure enough. Actually, there's a similar problem in transport.c, 
where it assumes that the return value of git_connect is non-zero, which 
makes it not reuse the connection (not that you can really tell). It might 
be good to roll in a fix for that. Or maybe git_connect should return a 
pointer to a static struct child_process if it doesn't need a subprocess, 
just to distinguish "we're doing it ourselves" from "it's not being done"? 
If not, maybe the variables that store the return from git_connect should 
be renamed to "subproc" or something that doesn't suggest they can't be 
NULL if you're actually connected.

	-Daniel
*This .sig left intentionally blank*

  reply	other threads:[~2008-02-09 17:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 16:58 [PATCH] Fix "git clone" for git:// protocol Johannes Schindelin
2008-02-09 17:16 ` Daniel Barkalow [this message]
2008-02-09 18:05   ` Johannes Schindelin
2008-02-10  3:06   ` Johannes Schindelin
2008-02-10  3:14     ` Daniel Barkalow
2008-02-10  4:15       ` Junio C Hamano
2008-02-10 12:12         ` Johannes Schindelin
2008-02-10 13:45           ` [PATCH] Add a test for git-daemon and clone via " Johannes Schindelin

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=alpine.LNX.1.00.0802091205530.13593@iabervon.org \
    --to=barkalow@iabervon.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).