]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME only when needed
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 3 Dec 2021 09:39:13 +0000 (09:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 5 Dec 2021 19:34:28 +0000 (11:34 -0800)
A couple of test scripts have actually been adapted to accommodate for a
configurable default branch name, but they still overrode it via the
`GIT_TEST_*` variable. Let's drop that override where possible.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 files changed:
t/t1022-read-tree-partial-clone.sh
t/t1400-update-ref.sh
t/t3201-branch-contains.sh
t/t3203-branch-output.sh
t/t3205-branch-color.sh
t/t3404-rebase-interactive.sh
t/t5310-pack-bitmaps.sh
t/t5505-remote.sh
t/t5510-fetch.sh
t/t5526-fetch-submodules.sh
t/t5703-upload-pack-ref-in-want.sh
t/t6300-for-each-ref.sh
t/t6302-for-each-ref-filter.sh
t/t7064-wtstatus-pv2.sh
t/t9151-svn-mergeinfo.sh
t/t9603-cvsimport-patchsets.sh
t/t9902-completion.sh

index a763e27c7da860219493380472a7c863815cb629..a9953b6a71c360a0c39d058ba61f9ff026ec04bf 100755 (executable)
@@ -4,9 +4,6 @@ test_description='git read-tree in partial clones'
 
 TEST_NO_CREATE_REPO=1
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 test_expect_success 'read-tree in partial clone prefetches in one batch' '
index 0d4f73acaa87e5f29a6346abb8d1dc6736d41794..406f5938fbdbc73602a5b7013d57b05c3fe73694 100755 (executable)
@@ -4,9 +4,6 @@
 #
 
 test_description='Test git update-ref and basic ref logging'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 Z=$ZERO_OID
index 349a810cee11df36dda3c8ed4bbca3df58040001..800fc33165a9eff0abe1f6edc27acb2b4978e317 100755 (executable)
@@ -2,9 +2,6 @@
 
 test_description='branch --contains <commit>, --no-contains <commit> --merged, and --no-merged'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 test_expect_success setup '
index 6e94c6db7b5aa987c29364f32fee8c0d52538adf..d34d77f89348d86518375a66e277bb118ff29c22 100755 (executable)
@@ -1,9 +1,6 @@
 #!/bin/sh
 
 test_description='git branch display tests'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
 
index 6a521c1a3e5225716c14656aa9230afaf5a7829d..0b61da92b37763213e4cee3744f127971cb6fcb1 100755 (executable)
@@ -1,9 +1,6 @@
 #!/bin/sh
 
 test_description='basic branch output coloring'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
index 12eb226957676e7a1de02c0c22f629c3dc78ba74..0baa68e9b4f89fa03f569eee4c779c4e1297e916 100755 (executable)
@@ -25,8 +25,6 @@ Initial setup:
  where A, B, D and G all touch file1, and one, two, three, four all
  touch file "conflict".
 '
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 
index dcf03d324a25a4bdc14156c6b53c5442f9c3d83b..b8a29950cc2a5329151682ec7ec8d5597ef5c986 100755 (executable)
@@ -1,8 +1,6 @@
 #!/bin/sh
 
 test_description='exercise basic bitmap functionality'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-bitmap.sh
index e6e3c8f552cd66fedaccbadb49cb47facb3f3863..7ce1a28ef65e62f9f8ff0dd03ec6633ba627fc8e 100755 (executable)
@@ -2,9 +2,6 @@
 
 test_description='git remote porcelain-ish'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 setup_repository () {
index a0faf0dd94909392d7fa3b263b30b2bb41d7ca35..8c33755c26792e571b55341279b2a1ca18c0f97c 100755 (executable)
@@ -5,9 +5,6 @@ test_description='Per branch config variables affects "git fetch".
 
 '
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-bundle.sh
 
index 2dc75b80db80964a6bcdbc3977be98f815b40dd0..840c89cc8b9cbd10b769d4bf67a278293278cfef 100755 (executable)
@@ -3,9 +3,6 @@
 
 test_description='Recursive "git fetch" for submodules'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
 export GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB
 
index 220098523a699451cbb3abaaa2850416561b981b..9d6cd7d98649c0fe0f40c474d5ed88528ac9ba8c 100755 (executable)
@@ -2,9 +2,6 @@
 
 test_description='upload-pack ref-in-want'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 get_actual_refs () {
index 9f2c706c12a930ec716db6100063b2201c542353..6aa9fb17ea3f95a6cdd7429e38b670491f25f57d 100755 (executable)
@@ -5,9 +5,6 @@
 
 test_description='for-each-ref test'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-gpg.sh
 . "$TEST_DIRECTORY"/lib-terminal.sh
index 1537aa21798b669e30c0dbdc0d72aa3465c141b6..1ce5f490e99d374e039d29e708ee98dfb8988eab 100755 (executable)
@@ -2,9 +2,6 @@
 
 test_description='test for-each-refs usage of ref-filter APIs'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-gpg.sh
 
index 47fc21d96232ae4ae46e2e7a9db63723bdc66ff0..20a0d2afc2a54d9cd446d2a70168641b7167a15a 100755 (executable)
@@ -4,10 +4,6 @@ test_description='git status --porcelain=v2
 
 This test exercises porcelain V2 output for git status.'
 
-
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./test-lib.sh
 
 
index 1fbe84feb1689cc413725f49189bcdd7f1379139..c93a5beab25703a935e22d012420e044a8c0ed8e 100755 (executable)
@@ -5,9 +5,6 @@
 
 test_description='git-svn svn mergeinfo properties'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./lib-git-svn.sh
 
 test_expect_success 'load svn dump' "
index 0e9daa5768c4c1cfd650bb2b552d4d6694bbe014..19f38f78f2b9350271c7bc6b16bd1f8a4f6eea5f 100755 (executable)
@@ -12,9 +12,6 @@
 # bug.
 
 test_description='git cvsimport testing for correct patchset estimation'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./lib-cvs.sh
 
 setup_cvs_test_repository t9603
index 518203fbe07399f794651d2bb81878ed0321d922..0f28c4ad940504f05c262c2040672ab6d9524526 100755 (executable)
@@ -5,9 +5,6 @@
 
 test_description='test bash completion'
 
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
-
 . ./lib-bash.sh
 
 complete ()