diff options
Diffstat (limited to 'builtin-ls-remote.c')
-rw-r--r-- | builtin-ls-remote.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c index 023754986e..8907a89d6c 100644 --- a/builtin-ls-remote.c +++ b/builtin-ls-remote.c @@ -94,11 +94,8 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack); ref = transport_get_remote_refs(transport); - transport_disconnect(transport); - - if (!ref) + if (transport_disconnect(transport)) return 1; - for ( ; ref; ref = ref->next) { if (!check_ref_type(ref, flags)) continue; |