summaryrefslogtreecommitdiff
path: root/builtin/ls-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-05 19:36:26 (GMT)
commitf52237576ab9ab054e8330ce5dc47f2020cbce74 (patch)
tree047a450219e871af81161578b738d6b2788bbc1a /builtin/ls-remote.c
parentf6be8fbcbafe552a8b60b9c9394203a752de5e06 (diff)
parent91a640ffb6d9dd10c293a575a692d9771b6e13c7 (diff)
downloadgit-f52237576ab9ab054e8330ce5dc47f2020cbce74.zip
git-f52237576ab9ab054e8330ce5dc47f2020cbce74.tar.gz
git-f52237576ab9ab054e8330ce5dc47f2020cbce74.tar.bz2
Merge branch 'jc/ls-remote-short-help'
* jc/ls-remote-short-help: ls-remote: a lone "-h" is asking for help
Diffstat (limited to 'builtin/ls-remote.c')
-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 1022309..41c88a9 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];