1 #include "git-compat-util.h"
2 #include "credential.h"
5 static const char usage_msg[] =
6 "git credential [fill|approve|reject]";
8 int cmd_credential(int argc, const char **argv, const char *prefix)
11 struct credential c = CREDENTIAL_INIT;
13 if (argc != 2 || !strcmp(argv[1], "-h"))
17 if (credential_read(&c, stdin) < 0)
18 die("unable to read credential from stdin");
20 if (!strcmp(op, "fill")) {
22 credential_write(&c, stdout);
23 } else if (!strcmp(op, "approve")) {
24 credential_approve(&c);
25 } else if (!strcmp(op, "reject")) {
26 credential_reject(&c);