Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-25 00:36:27 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-25 00:36:27 +0300
commit858119f6d78d13050d446b5d56445ad1e5432082 (patch)
tree6fa2b179520a0797e0e5099aea28ebeb5d51602c /t
parente537784f6454374d61d45e45f5e69fafcde18309 (diff)
parent7e5aa13d2cb590f7f21f195312ae1cf7de1cdd75 (diff)
Merge branch 'nk/diff-index-fsmonitor'
"git diff-index" codepath has been taught to trust fsmonitor status to reduce number of lstat() calls. * nk/diff-index-fsmonitor: fsmonitor: add perf test for git diff HEAD fsmonitor: add assertion that fsmonitor is valid to check_removed fsmonitor: skip lstat deletion check during git diff-index
Diffstat (limited to 't')
-rw-r--r--t/helper/test-chmtime.c4
-rwxr-xr-xt/perf/p7519-fsmonitor.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/t/helper/test-chmtime.c b/t/helper/test-chmtime.c
index aa22af48c2..524b55ca49 100644
--- a/t/helper/test-chmtime.c
+++ b/t/helper/test-chmtime.c
@@ -109,9 +109,9 @@ int cmd__chmtime(int argc, const char **argv)
uintmax_t mtime;
if (stat(argv[i], &sb) < 0) {
- fprintf(stderr, "Failed to stat %s: %s\n",
+ fprintf(stderr, "Failed to stat %s: %s. Skipping\n",
argv[i], strerror(errno));
- return 1;
+ continue;
}
#ifdef GIT_WINDOWS_NATIVE
diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index b657564aed..5eb5044a10 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -216,6 +216,10 @@ test_fsmonitor_suite() {
git diff
'
+ test_perf_w_drop_caches "diff HEAD ($DESC)" '
+ git diff HEAD
+ '
+
test_perf_w_drop_caches "diff -- 0_files ($DESC)" '
git diff -- 1_file
'