grep --no-index: don't use git standard exclusions

The --no-index mode is intended to be used outside of a git repository, and it does not make sense to apply the git standard exclusions outside a git repositories. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Bert Wesarg committed Sep 15, 2011 at 20:26 UTC a9e643668aa932d93528fffa573a13a28eb54556
2 files changed +1 -2
builtin-grep.c
-1
@@ -652,7 +652,6 @@ static int grep_directory(struct grep_opt *opt, const char **paths)
652 int i, hit = 0;
653
654 memset(&dir, 0, sizeof(dir));
655 - setup_standard_excludes(&dir);
655
656 fill_directory(&dir, paths);
657 for (i = 0; i < dir.nr; i++) {
t/t7002-grep.sh
+1 -1
@@ -439,7 +439,6 @@ test_expect_success 'outside of git repository' '
439 mkdir -p non/git/sub &&
440 echo hello >non/git/file1 &&
441 echo world >non/git/sub/file2 &&
442 - echo ".*o*" >non/git/.gitignore &&
442 {
443 echo file1:hello &&
444 echo sub/file2:world
@@ -466,6 +465,7 @@ test_expect_success 'inside git repository but with --no-index' '
465 echo world >is/git/sub/file2 &&
466 echo ".*o*" >is/git/.gitignore &&
467 {
468 + echo ".gitignore:.*o*" &&
469 echo file1:hello &&
470 echo sub/file2:world
471 } >is/expect.full &&