aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/credential.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-17 07:43:56 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-18 10:44:31 -0800
commit6c27d22276b754e2214242de7a200b372aa611f6 (patch)
tree3313fc3031e4312498e596d96f55f90b2c650d1a /builtin/credential.c
parentmailinfo: stop using `the_repository` (diff)
downloadgit-6c27d22276b754e2214242de7a200b372aa611f6.tar.gz
git-6c27d22276b754e2214242de7a200b372aa611f6.zip
credential: stop using `the_repository`
Stop using `the_repository` in the "credential" subsystem by passing in a repository when filling, approving or rejecting credentials. Adjust callers accordingly by using `the_repository`. While there may be some callers that have a repository available in their context, this trivial conversion allows for easier verification and bubbles up the use of `the_repository` by one level. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/credential.c')
-rw-r--r--builtin/credential.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/credential.c b/builtin/credential.c
index 14c8c6608b..614b195b75 100644
--- a/builtin/credential.c
+++ b/builtin/credential.c
@@ -32,15 +32,15 @@ int cmd_credential(int argc,
die("unable to read credential from stdin");
if (!strcmp(op, "fill")) {
- credential_fill(&c, 0);
+ credential_fill(the_repository, &c, 0);
credential_next_state(&c);
credential_write(&c, stdout, CREDENTIAL_OP_RESPONSE);
} else if (!strcmp(op, "approve")) {
credential_set_all_capabilities(&c, CREDENTIAL_OP_HELPER);
- credential_approve(&c);
+ credential_approve(the_repository, &c);
} else if (!strcmp(op, "reject")) {
credential_set_all_capabilities(&c, CREDENTIAL_OP_HELPER);
- credential_reject(&c);
+ credential_reject(the_repository, &c);
} else {
usage(usage_msg);
}