Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
22
t/perf/p4001-diff-no-index.sh
Executable file
22
t/perf/p4001-diff-no-index.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
test_description="Test diff --no-index performance"
|
||||
|
||||
. ./perf-lib.sh
|
||||
|
||||
test_perf_large_repo
|
||||
test_checkout_worktree
|
||||
|
||||
file1=$(git ls-files | tail -n 2 | head -1)
|
||||
file2=$(git ls-files | tail -n 1 | head -1)
|
||||
|
||||
test_expect_success "empty files, so they take no time to diff" "
|
||||
echo >$file1 &&
|
||||
echo >$file2
|
||||
"
|
||||
|
||||
test_perf "diff --no-index" "
|
||||
git diff --no-index $file1 $file2 >/dev/null
|
||||
"
|
||||
|
||||
test_done
|
||||
Loading…
Add table
Add a link
Reference in a new issue