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>maint
							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 cmd_submodule__helper(int argc, const char **argv, const char *prefix) | ||||||
| { | { | ||||||
| 	int i; | 	int i; | ||||||
| 	if (argc < 2) | 	if (argc < 2 || !strcmp(argv[1], "-h")) | ||||||
| 		die(_("submodule--helper subcommand must be " | 		usage("git submodule--helper <command>"); | ||||||
| 		      "called with a subcommand")); |  | ||||||
|  |  | ||||||
| 	for (i = 0; i < ARRAY_SIZE(commands); i++) { | 	for (i = 0; i < ARRAY_SIZE(commands); i++) { | ||||||
| 		if (!strcmp(argv[1], commands[i].cmd)) { | 		if (!strcmp(argv[1], commands[i].cmd)) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Jeff King
						Jeff King