diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2008-12-27 15:21:03 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-12-27 14:30:46 -0800 |
commit | 57d43466fbb4ffb4106b97593a96d714137dde2a (patch) | |
tree | 48db4a289f4c442803a5f7ea43f6e1fdc0398548 /t | |
parent | grep: support --no-ext-grep to test builtin grep (diff) | |
download | tgif-57d43466fbb4ffb4106b97593a96d714137dde2a.tar.xz |
grep: grep cache entries if they are "assume unchanged"
"Assume unchanged" bit means "please pretend that I have never touched
this file", so if user removes the file, we should not care.
This patch teaches "git grep" to use cache version in such
situations. External grep case has not been fixed yet. But given that
on the platform that CE_VALID bit may be used like Windows, external
grep is not available anyway, I would wait for people to raise their
hands before touching it.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7002-grep.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index 18fe6f2d57..c4938544d4 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -161,7 +161,14 @@ test_expect_success 'log grep (6)' ' git log --author=-0700 --pretty=tformat:%s >actual && >expect && test_cmp expect actual +' +test_expect_success 'grep with CE_VALID file' ' + git update-index --assume-unchanged t/t && + rm t/t && + test "$(git grep --no-ext-grep t)" = "t/t:test" && + git update-index --no-assume-unchanged t/t && + git checkout t/t ' test_done |