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

Function server_supports_feature

connect.c:112–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112int server_supports_feature(const char *c, const char *feature,
113 int die_on_error)
114{
115 size_t i;
116
117 for (i = 0; i < server_capabilities_v2.nr; i++) {
118 const char *out;
119 if (skip_prefix(server_capabilities_v2.v[i], c, &out) &&
120 (!*out || *(out++) == '=')) {
121 if (parse_feature_request(out, feature))
122 return 1;
123 else
124 break;
125 }
126 }
127
128 if (die_on_error)
129 die(_("server doesn't support feature '%s'"), feature);
130
131 return 0;
132}
133
134static void process_capabilities_v2(struct packet_reader *reader)
135{

Callers 5

add_wantsFunction · 0.85
send_fetch_requestFunction · 0.85
do_fetch_pack_v2Function · 0.85
fetch_refs_via_packFunction · 0.85
get_remote_refsFunction · 0.85

Calls 2

parse_feature_requestFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected