about summary refs log blame commit diff
path: root/third_party/git/t/perf/p7810-grep.sh
blob: 9f4ade639f74604e05fb42d236caf0ad621c3f7a (plain) (tree)






















                                                              
#!/bin/sh

test_description="git-grep performance in various modes"

. ./perf-lib.sh

test_perf_large_repo
test_checkout_worktree

test_perf 'grep worktree, cheap regex' '
	git grep some_nonexistent_string || :
'
test_perf 'grep worktree, expensive regex' '
	git grep "^.* *some_nonexistent_string$" || :
'
test_perf 'grep --cached, cheap regex' '
	git grep --cached some_nonexistent_string || :
'
test_perf 'grep --cached, expensive regex' '
	git grep --cached "^.* *some_nonexistent_string$" || :
'

test_done