Skip to content

Commit f0994fa

Browse files
peffgitster
authored andcommitted
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>
1 parent bb24659 commit f0994fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/submodule--helper.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,9 +1222,8 @@ static struct cmd_struct commands[] = {
12221222
int cmd_submodule__helper(int argc, const char **argv, const char *prefix)
12231223
{
12241224
int i;
1225-
if (argc < 2)
1226-
die(_("submodule--helper subcommand must be "
1227-
"called with a subcommand"));
1225+
if (argc < 2 || !strcmp(argv[1], "-h"))
1226+
usage("git submodule--helper <command>");
12281227

12291228
for (i = 0; i < ARRAY_SIZE(commands); i++) {
12301229
if (!strcmp(argv[1], commands[i].cmd)) {

0 commit comments

Comments
 (0)