ls-remote: a lone "-h" is asking for help
[gitweb.git] / builtin / ls-remote.c
index 97eed4012ba23cfe7f13cf2b6c160ade54f6b2d1..87d44bc62512cb014a7410fc2ad4e9559fffb608 100644 (file)
@@ -41,6 +41,9 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
        struct transport *transport;
        const struct ref *ref;
 
+       if (argc == 2 && !strcmp("-h", argv[1]))
+               usage(ls_remote_usage);
+
        for (i = 1; i < argc; i++) {
                const char *arg = argv[i];