git-grep: fix parsing of pathspec separator '--'
We used to misparse git grep -e foo -- '*.sh' Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
4d62eaabeb
commit
5390590f6d
@ -817,8 +817,12 @@ int cmd_grep(int argc, const char **argv, char **envp)
|
||||
}
|
||||
usage(builtin_grep_usage);
|
||||
}
|
||||
if (!strcmp("--", arg))
|
||||
if (!strcmp("--", arg)) {
|
||||
/* later processing wants to have this at argv[1] */
|
||||
argv--;
|
||||
argc++;
|
||||
break;
|
||||
}
|
||||
if (*arg == '-')
|
||||
usage(builtin_grep_usage);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user