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

Function credential_has_capability

credential.c:296–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296int credential_has_capability(const struct credential_capability *capa,
297 enum credential_op_type op_type)
298{
299 /*
300 * We're checking here if each previous step indicated that we had the
301 * capability. If it did, then we want to pass it along; conversely, if
302 * it did not, we don't want to report that to our caller.
303 */
304 switch (op_type) {
305 case CREDENTIAL_OP_HELPER:
306 return capa->request_initial;
307 case CREDENTIAL_OP_RESPONSE:
308 return capa->request_initial && capa->request_helper;
309 default:
310 return 0;
311 }
312}
313
314int credential_read(struct credential *c, FILE *fp,
315 enum credential_op_type op_type)

Callers 2

credential_writeFunction · 0.85
serve_one_clientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected