summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 12:36:26 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-05 12:36:26 -0700
commitf52237576ab9ab054e8330ce5dc47f2020cbce74 (patch)
tree047a450219e871af81161578b738d6b2788bbc1a
parentf6be8fbcbafe552a8b60b9c9394203a752de5e06 (diff)
parent91a640ffb6d9dd10c293a575a692d9771b6e13c7 (diff)
downloadgit-f52237576ab9ab054e8330ce5dc47f2020cbce74.tar.gz
Merge branch 'jc/ls-remote-short-help'
* jc/ls-remote-short-help: ls-remote: a lone "-h" is asking for help
-rw-r--r--builtin/ls-remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 10223092a9..41c88a98a2 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -43,6 +43,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];