aboutsummaryrefslogtreecommitdiff
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-05-30 01:16:50 -0400
committerJunio C Hamano <gitster@pobox.com>2017-05-30 14:45:04 +0900
commitf0994fa85dfcbd9854686d7b6de3b05b7952f41c (patch)
tree5a93874b8f8a8554625739166f82979eb8c0f1b2 /builtin/submodule--helper.c
parentbb246590a1b648ac23f6a22d1d9e119129ba2f03 (diff)
downloadgit-f0994fa85dfcbd9854686d7b6de3b05b7952f41c.tar.gz
git-f0994fa85dfcbd9854686d7b6de3b05b7952f41c.tar.xz
submodule--helper: show usage for "-h"
Normal users shouldn't ever call submodule--helper, but it doesn't hurt to give them a normal usage message if they try "-h". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 566a5b6a6..a78b003c2 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1222,9 +1222,8 @@ static struct cmd_struct commands[] = {
int cmd_submodule__helper(int argc, const char **argv, const char *prefix)
{
int i;
- if (argc < 2)
- die(_("submodule--helper subcommand must be "
- "called with a subcommand"));
+ if (argc < 2 || !strcmp(argv[1], "-h"))
+ usage("git submodule--helper <command>");
for (i = 0; i < ARRAY_SIZE(commands); i++) {
if (!strcmp(argv[1], commands[i].cmd)) {