MCPcopy Index your code
hub / github.com/git/git / get_capability

Function get_capability

serve.c:218–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218static struct protocol_capability *get_capability(const char *key, const char **value)
219{
220 if (!key)
221 return NULL;
222
223 for (size_t i = 0; i < ARRAY_SIZE(capabilities); i++) {
224 struct protocol_capability *c = &capabilities[i];
225 const char *out;
226 if (!skip_prefix(key, c->name, &out))
227 continue;
228 if (!*out) {
229 *value = NULL;
230 return c;
231 }
232 if (*out++ == '=') {
233 *value = out;
234 return c;
235 }
236 }
237
238 return NULL;
239}
240
241static int receive_client_capability(struct repository *r, const char *key)
242{

Callers 2

parse_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected