mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
![Thomas Rast](/assets/img/avatar_default.png)
The only catch is that we don't really know what our repo contains, so we have to ignore any possible "not found" status from git-grep. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
24 lines
512 B
Bash
Executable file
24 lines
512 B
Bash
Executable file
#!/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
|