Merge branch 'bw/grep-no-index-no-exclude'
* bw/grep-no-index-no-exclude: grep --no-index: don't use git standard exclusions grep: do not use --index in the short usage output
This commit is contained in:
@ -646,7 +646,6 @@ static int grep_directory(struct grep_opt *opt, const struct pathspec *pathspec)
|
||||
int i, hit = 0;
|
||||
|
||||
memset(&dir, 0, sizeof(dir));
|
||||
setup_standard_excludes(&dir);
|
||||
|
||||
fill_directory(&dir, pathspec->raw);
|
||||
for (i = 0; i < dir.nr; i++) {
|
||||
@ -777,8 +776,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
|
||||
struct option options[] = {
|
||||
OPT_BOOLEAN(0, "cached", &cached,
|
||||
"search in index instead of in the work tree"),
|
||||
OPT_BOOLEAN(0, "index", &use_index,
|
||||
"--no-index finds in contents not managed by git"),
|
||||
{ OPTION_BOOLEAN, 0, "index", &use_index, NULL,
|
||||
"finds in contents not managed by git",
|
||||
PARSE_OPT_NOARG | PARSE_OPT_NEGHELP },
|
||||
OPT_GROUP(""),
|
||||
OPT_BOOLEAN('v', "invert-match", &opt.invert,
|
||||
"show non-matching lines"),
|
||||
|
||||
Reference in New Issue
Block a user