Skip to content

Commit bb0372c

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7a75e13 commit bb0372c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

t/t3200-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ EOF
519519

520520
mv .git/config .git/config-saved
521521

522-
test_expect_success SHA1 'git branch -m q q2 without config should succeed' '
522+
test_expect_success DEFAULT_REPO_FORMAT 'git branch -m q q2 without config should succeed' '
523523
git branch -m q q2 &&
524524
git branch -m q2 q
525525
'

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,10 @@ test_lazy_prereq SHA1 '
19361936
esac
19371937
'
19381938

1939+
test_lazy_prereq DEFAULT_REPO_FORMAT '
1940+
test_have_prereq SHA1
1941+
'
1942+
19391943
# Ensure that no test accidentally triggers a Git command
19401944
# that runs the actual maintenance scheduler, affecting a user's
19411945
# system permanently.

0 commit comments

Comments
 (0)