interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / perf / p0009-diff-pathspec.sh

32 lines · 645 bytes Raw Blame History
1#!/bin/sh
2
3test_description='Tests performance of diffing the working tree with a pathspec'
4
5. ./perf-lib.sh
6
7test_perf_fresh_repo
8
9count=10000
10if test_have_prereq EXPENSIVE
11then
12 count=100000
13fi
14
15# The entries exist only in the index, which is enough to
16# exercise the index scan.
17test_expect_success 'setup' '
18 blob=$(echo content | git hash-object -w --stdin) &&
19 {
20 printf "100644 $blob\taaa/file\n" &&
21 printf "100644 $blob\tf%s\n" $(test_seq $count)
22 } | git update-index --index-info &&
23 git commit -q -m initial &&
24 mkdir -p aaa &&
25 echo content >aaa/file
26'
27
28test_perf 'diff pathspec subtree' '
29 git diff HEAD -- aaa/file
30'
31
32test_done