This shares the connection between getting the remote ref list and
getting objects in the first batch. (A second connection is still used
to follow tags).
When we do not fetch objects (i.e. either ls-remote disconnects after
getting list of refs, or we decide we are already up-to-date), we
clean up the connection properly; otherwise the connection is left
open in need of cleaning up to avoid getting an error message from
the remote end when ssh is used.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Daniel Barkalow17 years agocommitted byJunio C Hamano
@ -593,20 +595,20 @@ static int set_git_option(struct transport *connection,
@@ -593,20 +595,20 @@ static int set_git_option(struct transport *connection,
return 1;
}
static int connect_setup(struct transport *transport)
@ -617,7 +619,7 @@ static int fetch_refs_via_pack(struct transport *transport,
@@ -617,7 +619,7 @@ static int fetch_refs_via_pack(struct transport *transport,
@ -632,13 +634,27 @@ static int fetch_refs_via_pack(struct transport *transport,
@@ -632,13 +634,27 @@ static int fetch_refs_via_pack(struct transport *transport,
@ -661,7 +677,15 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const
@@ -661,7 +677,15 @@ static int git_transport_push(struct transport *transport, int refspec_nr, const
static int disconnect_git(struct transport *transport)