]> git.ipfire.org Git - thirdparty/git.git/commitdiff
perf: disable automatic housekeeping
authorRené Scharfe <l.s.r@web.de>
Sat, 9 Oct 2021 14:39:24 +0000 (16:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Oct 2021 20:17:58 +0000 (13:17 -0700)
Turn off automatic background maintenance for perf tests by default to
avoid interference with performance measurements.  Do that by using the
new file t/perf/config and using it as the system config file for perf
tests.  Future tests intended to measure gc performance can override
the setting locally or call "git gc" explicitly.

This fixes a breakage in p2000 caused by gc automatically emptying the
reflog due its fake dates from 2005 being older than 90 days.

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/config [new file with mode: 0644]
t/perf/perf-lib.sh

diff --git a/t/perf/config b/t/perf/config
new file mode 100644 (file)
index 0000000..b92768b
--- /dev/null
@@ -0,0 +1,2 @@
+[gc]
+       auto = 0
index f5ed092ee591ca3c350e274495acf1e37ce868c6..69ae381948e743dcb8ff629745336060899b74e2 100644 (file)
@@ -27,6 +27,10 @@ TEST_NO_MALLOC_CHECK=t
 
 . ../test-lib.sh
 
+unset GIT_CONFIG_NOSYSTEM
+GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
+export GIT_CONFIG_SYSTEM
+
 if test -n "$GIT_TEST_INSTALLED" -a -z "$PERF_SET_GIT_TEST_INSTALLED"
 then
        error "Do not use GIT_TEST_INSTALLED with the perf tests.