tests: set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME only when needed
PATCH 1/1 tests: set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME only when needed
From: Johannes Schindelin <[email protected]>
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.
---
Drop GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME where possible
We still set this variable in quite a couple of test scripts. Some of them do not actually need it anymore, though.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1089%2Fdscho%2Ft3404-and-default-branch-name-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1089/dscho/t3404-and-default-branch-name-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1089
t/t1022-read-tree-partial-clone.sh | 3 --- t/t1400-update-ref.sh | 3 --- t/t3201-branch-contains.sh | 3 --- t/t3203-branch-output.sh | 3 --- t/t3205-branch-color.sh | 3 --- t/t3404-rebase-interactive.sh | 2 -- t/t5310-pack-bitmaps.sh | 2 -- t/t5505-remote.sh | 3 --- t/t5510-fetch.sh | 3 --- t/t5526-fetch-submodules.sh | 3 --- t/t5703-upload-pack-ref-in-want.sh | 3 --- t/t6300-for-each-ref.sh | 3 --- t/t6302-for-each-ref-filter.sh | 3 --- t/t7064-wtstatus-pv2.sh | 4 ---- t/t9151-svn-mergeinfo.sh | 3 --- t/t9603-cvsimport-patchsets.sh | 3 --- t/t9902-completion.sh | 3 --- 17 files changed, 50 deletions(-)
t/t1022-read-tree-partial-clone.sh +0 -3
@@ -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' '
t/t1400-update-ref.sh +0 -3
@@ -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
t/t3201-branch-contains.sh +0 -3
@@ -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 '
t/t3203-branch-output.sh +0 -3
@@ -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
t/t3205-branch-color.sh +0 -3
@@ -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
t/t3404-rebase-interactive.sh +0 -2
@@ -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
t/t5310-pack-bitmaps.sh +0 -2
@@ -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
t/t5505-remote.sh +0 -3
@@ -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 () {
t/t5510-fetch.sh +0 -3
@@ -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
t/t5526-fetch-submodules.sh +0 -3
@@ -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
t/t5703-upload-pack-ref-in-want.sh +0 -3
@@ -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 () {
t/t6300-for-each-ref.sh +0 -3
@@ -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
t/t6302-for-each-ref-filter.sh +0 -3
@@ -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
t/t7064-wtstatus-pv2.sh +0 -4
@@ -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
t/t9151-svn-mergeinfo.sh +0 -3
@@ -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' "
t/t9603-cvsimport-patchsets.sh +0 -3
@@ -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
t/t9902-completion.sh +0 -3
@@ -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 ()
base-commit: abe6bb3905392d5eb6b01fa6e54d7e784e0522aa
Signature · 1 line
gitgitgadget
"Johannes Schindelin via GitGitGadget" <[email protected]>
Quoted 5 lines · writes:
From: Johannes Schindelin <[email protected]>
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.
Nice clean-up. Will apply. Thanks.
Quoted 269 lines
Signed-off-by Johannes Schindelin <[email protected]>---
DropGIT_TEST_DEFAULT_INITIAL_BRANCH_NAMEwhere possibleWe still set this variable in quite a couple of test scripts. Some of them do not actually need it anymore, though.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1089%2Fdscho%2Ft3404-and-default-branch-name-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1089/dscho/t3404-and-default-branch-name-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1089t/t1022-read-tree-partial-clone.sh | 3 --- t/t1400-update-ref.sh | 3 --- t/t3201-branch-contains.sh | 3 --- t/t3203-branch-output.sh | 3 --- t/t3205-branch-color.sh | 3 --- t/t3404-rebase-interactive.sh | 2 -- t/t5310-pack-bitmaps.sh | 2 -- t/t5505-remote.sh | 3 --- t/t5510-fetch.sh | 3 --- t/t5526-fetch-submodules.sh | 3 --- t/t5703-upload-pack-ref-in-want.sh | 3 --- t/t6300-for-each-ref.sh | 3 --- t/t6302-for-each-ref-filter.sh | 3 --- t/t7064-wtstatus-pv2.sh | 4 ---- t/t9151-svn-mergeinfo.sh | 3 --- t/t9603-cvsimport-patchsets.sh | 3 --- t/t9902-completion.sh | 3 --- 17 files changed, 50 deletions(-)t/t1022-read-tree-partial-clone.sh +0
-3@@ -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' 't/t1400-update-ref.sh +0
-3@@ -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_OIDt/t3201-branch-contains.sh +0
-3@@ -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 't/t3203-branch-output.sh +0
-3@@ -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.sht/t3205-branch-color.sh +0
-3@@ -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.sht/t3404-rebase-interactive.sh +0
-2@@ -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.sht/t5310-pack-bitmaps.sh +0
-2@@ -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.sht/t5505-remote.sh +0
-3@@ -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 () {t/t5510-fetch.sh +0
-3@@ -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.sht/t5526-fetch-submodules.sh +0
-3@@ -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_ODBt/t5703-upload-pack-ref-in-want.sh +0
-3@@ -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 () {t/t6300-for-each-ref.sh +0
-3@@ -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.sht/t6302-for-each-ref-filter.sh +0
-3@@ -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.sht/t7064-wtstatus-pv2.sh +0
-4@@ -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.sht/t9151-svn-mergeinfo.sh +0
-3@@ -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' "t/t9603-cvsimport-patchsets.sh +0
-3@@ -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 t9603t/t9902-completion.sh +0
-3@@ -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 ()base-commit:
abe6bb3905392d5eb6b01fa6e54d7e784e0522aa