projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d62eaa
)
git-grep: fix parsing of pathspec separator '--'
author
Junio C Hamano
<junkio@cox.net>
Tue, 4 Jul 2006 09:31:50 +0000
(
02:31
-0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 4 Jul 2006 10:15:46 +0000
(
03:15
-0700)
We used to misparse
git grep -e foo -- '*.sh'
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c
patch
|
blob
|
history
diff --git
a/builtin-grep.c
b/builtin-grep.c
index 2e7986cecefc964f665b10d363569951c1f40293..a8bec72f82a9cac96b2b46bddb255b8be15cd6d1 100644
(file)
--- a/
builtin-grep.c
+++ b/
builtin-grep.c
@@
-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);