From: Jeff King Date: Tue, 30 May 2017 05:16:50 +0000 (-0400) Subject: submodule--helper: show usage for "-h" X-Git-Tag: v2.14.0-rc0~84^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f0994fa85dfcbd9854686d7b6de3b05b7952f41c 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 --- 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)) {