]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: avoid "whitelist"
authorDerrick Stolee <derrickstolee@github.com>
Tue, 19 Jul 2022 18:32:16 +0000 (18:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jul 2022 19:45:31 +0000 (12:45 -0700)
The word "whitelist" has cultural implications that are not inclusive.
Thankfully, it is not difficult to reword and avoid its use.

Focus on changes in the test scripts, since most of the changes are in
comments and test names. The renamed test_allow_var helper is only used
once inside the widely-used test_proto helper.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/lib-proto-disable.sh
t/t5812-proto-disable-http.sh
t/t5815-submodule-protos.sh
t/test-lib-functions.sh

index 83babe57d959005315ed0780caced285b440e8bc..890622be81642b5df530fb5502c882d4efc32897 100644 (file)
@@ -1,7 +1,7 @@
 # Test routines for checking protocol disabling.
 
-# Test clone/fetch/push with GIT_ALLOW_PROTOCOL whitelist
-test_whitelist () {
+# Test clone/fetch/push with GIT_ALLOW_PROTOCOL environment variable
+test_allow_var () {
        desc=$1
        proto=$2
        url=$3
@@ -183,7 +183,7 @@ test_config () {
 #   $2 - machine-readable name of the protocol
 #   $3 - the URL to try cloning
 test_proto () {
-       test_whitelist "$@"
+       test_allow_var "$@"
 
        test_config "$@"
 }
index af8772fadaa0d590370ba8a28b33c5b455164312..d8da5f58d16a149647ec35876117b1874bff61f7 100755 (executable)
@@ -16,7 +16,7 @@ test_expect_success 'create git-accessible repo' '
 
 test_proto "smart http" http "$HTTPD_URL/smart/repo.git"
 
-test_expect_success 'curl redirects respect whitelist' '
+test_expect_success 'http(s) transport respects GIT_ALLOW_PROTOCOL' '
        test_must_fail env GIT_ALLOW_PROTOCOL=http:https \
                           GIT_SMART_HTTP=0 \
                git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr &&
index 06f55a1b8a0b57a1dad151d591e9469c81588775..4d5956cc18f0d7563baea9593e0ea2387e33cd57 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='test protocol whitelisting with submodules'
+test_description='test protocol filtering with submodules'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-proto-disable.sh
 
@@ -36,7 +36,7 @@ test_expect_success 'update of ext not allowed' '
        test_must_fail git -C dst submodule update ext-module
 '
 
-test_expect_success 'user can override whitelist' '
+test_expect_success 'user can filter protocols with GIT_ALLOW_PROTOCOL' '
        GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module
 '
 
index 6da7273f1d5fdd08f5581cfb771f1bb83f8ef6bb..8c44856eaec0d8fed84f5a4959edce275c8b79eb 100644 (file)
@@ -651,8 +651,7 @@ test_set_prereq () {
                # test_unset_prereq()
                !*)
                        ;;
-               # (Temporary?) whitelist of things we can't easily
-               # pretend not to support
+               # List of things we can't easily pretend to not support
                SYMLINKS)
                        ;;
                # Inspecting whether GIT_TEST_FAIL_PREREQS is on