diff options
Diffstat (limited to 't/t7002-grep.sh')
-rwxr-xr-x | t/t7002-grep.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index 23eeb767f9..99142fd6bd 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -340,4 +340,16 @@ test_expect_success 'grep -p -B5' ' test_cmp expected actual ' +test_expect_success EXTGREP 'external grep is called' ' + GIT_TRACE=2 git grep foo >/dev/null 2>actual && + grep "trace: grep:.*foo" actual >/dev/null +' + +test_expect_success EXTGREP 'no external grep when skip-worktree entries exist' ' + git update-index --skip-worktree file && + GIT_TRACE=2 git grep foo >/dev/null 2>actual && + ! grep "trace: grep:" actual >/dev/null && + git update-index --no-skip-worktree file +' + test_done |