transport.c: avoid "whitelist"
The word "whitelist" has cultural implications that are not inclusive. Thankfully, it is not difficult to reword and avoid its use. The GIT_ALLOW_PROTOCOL environment variable was referred to as a "whitelist", but the word "allow" is already part of the variable. Replace "whitelist" with "allow_list" in these cases to demonstrate that we are processing a list of allowed protocols. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee committed
Jul 19, 2022 at 18:32 UTC
f5adaa5cc31006ad6a2a62d5be008e3453a365e4
1 file changed
+4
-4
transport.c
+4
-4
@@ -940,7 +940,7 @@ static int external_specification_len(const char *url)
940
return strchr(url, ':') - url;
941
}
942
943
-static const struct string_list *protocol_whitelist(void)
943
+static const struct string_list *protocol_allow_list(void)
944
{
945
static int enabled = -1;
946
static struct string_list allowed = STRING_LIST_INIT_DUP;
@@ -1020,9 +1020,9 @@ static enum protocol_allow_config get_protocol_config(const char *type)
1020
1021
int is_transport_allowed(const char *type, int from_user)
1022
{
1023
- const struct string_list *whitelist = protocol_whitelist();
1024
- if (whitelist)
1025
- return string_list_has_string(whitelist, type);
1023
+ const struct string_list *allow_list = protocol_allow_list();
1024
+ if (allow_list)
1025
+ return string_list_has_string(allow_list, type);
1026
1027
switch (get_protocol_config(type)) {
1028
case PROTOCOL_ALLOW_ALWAYS: