X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=builtin-ls-remote.c;h=c21b841e7c5e8d27a6e66e7f70786d77aa4653b5;hb=3814c07498f87e7d27b55175ca2852fcc4cd27f4;hp=023754986e347a9529d6295d600f665f32f14577;hpb=6b48990354b6380665565f21c3f89d2f7109c459;p=git.git diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c index 023754986..c21b841e7 100644 --- a/builtin-ls-remote.c +++ b/builtin-ls-remote.c @@ -4,7 +4,7 @@ #include "remote.h" static const char ls_remote_usage[] = -"git-ls-remote [--upload-pack=] [:]"; +"git ls-remote [--upload-pack=] [:]"; /* * Is there one among the list of patterns that match the tail part @@ -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,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;