Skip to content

Commit

Permalink
remote show: Clean up connection correctly if object fetch wasn't done
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Mar 2, 2008
1 parent 4ebc914 commit 6217367
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6217367

Please sign in to comment.