MCPcopy Create free account
hub / github.com/git/git / protocol_allow_list

Function protocol_allow_list

transport.c:1047–1064  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1045}
1046
1047static const struct string_list *protocol_allow_list(void)
1048{
1049 static int enabled = -1;
1050 static struct string_list allowed = STRING_LIST_INIT_DUP;
1051
1052 if (enabled < 0) {
1053 const char *v = getenv("GIT_ALLOW_PROTOCOL");
1054 if (v) {
1055 string_list_split(&allowed, v, ":", -1);
1056 string_list_sort(&allowed);
1057 enabled = 1;
1058 } else {
1059 enabled = 0;
1060 }
1061 }
1062
1063 return enabled ? &allowed : NULL;
1064}
1065
1066enum protocol_allow_config {
1067 PROTOCOL_ALLOW_NEVER = 0,

Callers 1

is_transport_allowedFunction · 0.85

Calls 2

string_list_splitFunction · 0.85
string_list_sortFunction · 0.70

Tested by

no test coverage detected