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

Function credential_do

credential.c:484–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484static int credential_do(struct credential *c, const char *helper,
485 const char *operation)
486{
487 struct strbuf cmd = STRBUF_INIT;
488 int r;
489
490 if (helper[0] == '!')
491 strbuf_addstr(&cmd, helper + 1);
492 else if (is_absolute_path(helper))
493 strbuf_addstr(&cmd, helper);
494 else
495 strbuf_addf(&cmd, "git credential-%s", helper);
496
497 strbuf_addf(&cmd, " %s", operation);
498 r = run_credential_helper(c, cmd.buf, !strcmp(operation, "get"));
499
500 strbuf_release(&cmd);
501 return r;
502}
503
504void credential_fill(struct repository *r,
505 struct credential *c, int all_capabilities)

Callers 3

credential_fillFunction · 0.85
credential_approveFunction · 0.85
credential_rejectFunction · 0.85

Calls 5

strbuf_addstrFunction · 0.85
is_absolute_pathFunction · 0.85
strbuf_addfFunction · 0.85
run_credential_helperFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected