Code

remote show: Clean up connection correctly if object fetch wasn't done
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Sun, 2 Mar 2008 05:31:59 +0000 (05:31 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Mar 2008 23:33:55 +0000 (15:33 -0800)
Like in ls-remote, we have to disconnect the transport after getting
the remote refs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-remote.c

index d0c07c7a0b7e31aeb61b4c8d94b1dac3c381598b..98ff1b727e97e0b1bc6b7db4a6cdcdfc27adb84d 100644 (file)
@@ -387,6 +387,7 @@ static int show_or_prune(int argc, const char **argv, int prune)
                transport = transport_get(NULL, states.remote->url_nr > 0 ?
                        states.remote->url[0] : NULL);
                ref = transport_get_remote_refs(transport);
+               transport_disconnect(transport);
 
                read_branches();
                got_states = get_ref_states(ref, &states);