X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-ls-remote.c;h=06ab8da1fb1e5ebc5fedb82e74d7e6a7374cee0e;hb=e85dc0a3c7a3f4f8d5aade83fd340b8df73471cd;hp=6dd31d1dd6c14677f91e8a0a941fb0f873b4c1fc;hpb=e98d6df75260312e906278705f78f2eee39cc8fc;p=git.git diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c index 6dd31d1dd..06ab8da1f 100644 --- a/builtin-ls-remote.c +++ b/builtin-ls-remote.c @@ -31,7 +31,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) { int i; const char *dest = NULL; - int nongit = 0; + int nongit; unsigned flags = 0; const char *uploadpack = NULL; const char **pattern = NULL; @@ -94,10 +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); - - if (!ref) + if (transport_disconnect(transport)) return 1; - for ( ; ref; ref = ref->next) { if (!check_ref_type(ref, flags)) continue;