1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-02 15:28:21 +01:00

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>
This commit is contained in:
Bert Wesarg 2011-09-15 20:26:03 +02:00 committed by Junio C Hamano
parent ac1d33dd02
commit a9e643668a
2 changed files with 1 additions and 2 deletions

View file

@ -652,7 +652,6 @@ static int grep_directory(struct grep_opt *opt, const char **paths)
int i, hit = 0;
memset(&dir, 0, sizeof(dir));
setup_standard_excludes(&dir);
fill_directory(&dir, paths);
for (i = 0; i < dir.nr; i++) {

View file

@ -439,7 +439,6 @@ test_expect_success 'outside of git repository' '
mkdir -p non/git/sub &&
echo hello >non/git/file1 &&
echo world >non/git/sub/file2 &&
echo ".*o*" >non/git/.gitignore &&
{
echo file1:hello &&
echo sub/file2:world
@ -466,6 +465,7 @@ test_expect_success 'inside git repository but with --no-index' '
echo world >is/git/sub/file2 &&
echo ".*o*" >is/git/.gitignore &&
{
echo ".gitignore:.*o*" &&
echo file1:hello &&
echo sub/file2:world
} >is/expect.full &&