Skip to content

Commit da6bf70

Browse files
Andreas EricssonJunio C Hamano
authored andcommitted
git: grok 'help' to mean '--help'.
Most other scm's understand it, most users expect it and it's an easy fix. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 2ed8e62 commit da6bf70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

git.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ int main(int argc, char **argv, char **envp)
244244
for (i = 1; i < argc; i++) {
245245
char *arg = argv[i];
246246

247+
if (!strcmp(arg, "help")) {
248+
show_help = 1;
249+
continue;
250+
}
251+
247252
if (strncmp(arg, "--", 2))
248253
break;
249254

0 commit comments

Comments
 (0)