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>
This commit is contained in:
parent
bb246590a1
commit
f0994fa85d
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user