Skip to content

Commit 74947e5

Browse files
committed
t0613: stop setting default initial branch
As the tests are all run in separate repositories, set the branch name to "master" when creating the repository for the tests where the result depends on the branch name. This reduceds the number of tests that depend on the default branch name being "master" and removes the last instance of a test file using "GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= master". Signed-off-by: Phillip Wood <[email protected]>
1 parent c2ed6de commit 74947e5

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

t/t0613-reftable-write-options.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ export GIT_TEST_REFTABLE_AUTOCOMPACTION
1111
# Block sizes depend on the hash function, so we force SHA1 here.
1212
GIT_TEST_DEFAULT_HASH=sha1
1313
export GIT_TEST_DEFAULT_HASH
14-
# Block sizes also depend on the actual refs we write, so we force "master" to
15-
# be the default initial branch name.
16-
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
17-
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1814

1915
. ./test-lib.sh
2016

2117
test_expect_success 'default write options' '
2218
test_when_finished "rm -rf repo" &&
23-
git init repo &&
19+
# Block sizes also depend on the actual refs we write, so we force
20+
# "master" to be the default initial branch name.
21+
git init --initial-branch master repo &&
2422
(
2523
cd repo &&
2624
test_commit initial &&
@@ -43,7 +41,7 @@ test_expect_success 'default write options' '
4341
test_expect_success 'disabled reflog writes no log blocks' '
4442
test_config_global core.logAllRefUpdates false &&
4543
test_when_finished "rm -rf repo" &&
46-
git init repo &&
44+
git init --initial-branch master repo &&
4745
(
4846
cd repo &&
4947
test_commit initial &&
@@ -62,7 +60,7 @@ test_expect_success 'disabled reflog writes no log blocks' '
6260

6361
test_expect_success 'many refs results in multiple blocks' '
6462
test_when_finished "rm -rf repo" &&
65-
git init repo &&
63+
git init --initial-branch master repo &&
6664
(
6765
cd repo &&
6866
test_commit initial &&
@@ -115,7 +113,7 @@ test_expect_success 'tiny block size leads to error' '
115113
test_expect_success 'small block size leads to multiple ref blocks' '
116114
test_config_global core.logAllRefUpdates false &&
117115
test_when_finished "rm -rf repo" &&
118-
git init repo &&
116+
git init --initial-branch master repo &&
119117
(
120118
cd repo &&
121119
test_commit A &&
@@ -172,7 +170,7 @@ test_expect_success 'block size exceeding maximum supported size' '
172170

173171
test_expect_success 'restart interval at every single record' '
174172
test_when_finished "rm -rf repo" &&
175-
git init repo &&
173+
git init --initial-branch master repo &&
176174
(
177175
cd repo &&
178176
test_commit initial &&
@@ -212,7 +210,7 @@ test_expect_success 'restart interval exceeding maximum supported interval' '
212210
test_expect_success 'object index gets written by default with ref index' '
213211
test_config_global core.logAllRefUpdates false &&
214212
test_when_finished "rm -rf repo" &&
215-
git init repo &&
213+
git init --initial-branch master repo &&
216214
(
217215
cd repo &&
218216
test_commit initial &&
@@ -247,7 +245,7 @@ test_expect_success 'object index gets written by default with ref index' '
247245
test_expect_success 'object index can be disabled' '
248246
test_config_global core.logAllRefUpdates false &&
249247
test_when_finished "rm -rf repo" &&
250-
git init repo &&
248+
git init --initial-branch master repo &&
251249
(
252250
cd repo &&
253251
test_commit initial &&

0 commit comments

Comments
 (0)