tvl-depot/third_party/git/t/perf/p4001-diff-no-index.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

22 lines
404 B
Bash
Executable file

#!/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