]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bw/grep-no-index-no-exclude'
authorJunio C Hamano <gitster@pobox.com>
Fri, 14 Oct 2011 02:03:18 +0000 (19:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Oct 2011 02:03:18 +0000 (19:03 -0700)
* 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

1  2 
builtin/grep.c
t/t7810-grep.sh

diff --cc builtin/grep.c
index a286692e467710d92346ab6900e98f1126cb967d,a10946db3c49797ef717734924416df0879b55a1..91c3a852f6eb88c9c56a75dec6239d9043683764
@@@ -646,14 -652,9 +646,13 @@@ static int grep_directory(struct grep_o
        int i, hit = 0;
  
        memset(&dir, 0, sizeof(dir));
-       setup_standard_excludes(&dir);
  
 -      fill_directory(&dir, paths);
 +      fill_directory(&dir, pathspec->raw);
        for (i = 0; i < dir.nr; i++) {
 +              const char *name = dir.entries[i]->name;
 +              int namelen = strlen(name);
 +              if (!match_pathspec_depth(pathspec, name, namelen, 0, NULL))
 +                      continue;
                hit |= grep_file(opt, dir.entries[i]->name);
                if (hit && opt->status_only)
                        break;
diff --cc t/t7810-grep.sh
Simple merge