aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-12-29 08:26:26 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-02 09:24:47 -0800
commitbb0372c9799915fc3e6c2cf8e17815ce22622acd (patch)
tree62d743dd63cbc5aec628676dd66666a1ba1533c1 /t/test-lib.sh
parent7a75e131d68f8aa4889003cb048bb092422f9051 (diff)
downloadgit-bb0372c9799915fc3e6c2cf8e17815ce22622acd.tar.gz
t: introduce DEFAULT_REPO_FORMAT prereq
A limited number of tests require repositories to have the default repository format or otherwise they would fail to run, e.g. because they fail to detect the correct hash function. While the hash function is the only extension right now that creates problems like this, we are about to add a second extension for the ref format. Introduce a new DEFAULT_REPO_FORMAT prereq that can easily be amended whenever we add new format extensions. Next to making any such changes easier on us, the prerequisite's name should also help to clarify the intent better. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 876b99562a..dc03f06b8e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1936,6 +1936,10 @@ test_lazy_prereq SHA1 '
esac
'
+test_lazy_prereq DEFAULT_REPO_FORMAT '
+ test_have_prereq SHA1
+'
+
# Ensure that no test accidentally triggers a Git command
# that runs the actual maintenance scheduler, affecting a user's
# system permanently.