From f0994fa85dfcbd9854686d7b6de3b05b7952f41c Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 30 May 2017 01:16:50 -0400 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- builtin/submodule--helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 566a5b6a6f..a78b003c25 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 "); for (i = 0; i < ARRAY_SIZE(commands); i++) { if (!strcmp(argv[1], commands[i].cmd)) { -- 2.11.4.GIT