Browse Source

remote show: Clean up connection correctly if object fetch wasn't done

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>
maint
Johannes Schindelin 17 years ago committed by Junio C Hamano
parent
commit
6217367859
  1. 1
      builtin-remote.c

1
builtin-remote.c

@ -387,6 +387,7 @@ static int show_or_prune(int argc, const char **argv, int prune) @@ -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);

Loading…
Cancel
Save