mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-16 11:02:37 -05: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:
committed by
Junio C Hamano
parent
ac1d33dd02
commit
a9e643668a
@@ -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++) {
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user