perf: disable automatic housekeeping

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>

René Scharfe committed Oct 9, 2021 at 16:39 UTC be79131a537f5f35825c01262b2345097a9d2142
2 files changed +6
t/perf/config new
+2
@@ -0,0 +1,2 @@
1 +[gc]
2 + auto = 0
t/perf/perf-lib.sh
+4
@@ -27,6 +27,10 @@ TEST_NO_MALLOC_CHECK=t
27
28 . ../test-lib.sh
29
30 +unset GIT_CONFIG_NOSYSTEM
31 +GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
32 +export GIT_CONFIG_SYSTEM
33 +
34 if test -n "$GIT_TEST_INSTALLED" -a -z "$PERF_SET_GIT_TEST_INSTALLED"
35 then
36 error "Do not use GIT_TEST_INSTALLED with the perf tests.