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

Function option_parse_push_signed

send-pack.c:23–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "write-or-die.h"
22
23int option_parse_push_signed(const struct option *opt,
24 const char *arg, int unset)
25{
26 if (unset) {
27 *(int *)(opt->value) = SEND_PACK_PUSH_CERT_NEVER;
28 return 0;
29 }
30 switch (git_parse_maybe_bool(arg)) {
31 case 1:
32 *(int *)(opt->value) = SEND_PACK_PUSH_CERT_ALWAYS;
33 return 0;
34 case 0:
35 *(int *)(opt->value) = SEND_PACK_PUSH_CERT_NEVER;
36 return 0;
37 }
38 if (!strcasecmp("if-asked", arg)) {
39 *(int *)(opt->value) = SEND_PACK_PUSH_CERT_IF_ASKED;
40 return 0;
41 }
42 die("bad %s argument: %s", opt->long_name, arg);
43}
44
45static void feed_object(struct repository *r,
46 const struct object_id *oid, FILE *fh, int negative)

Callers

nothing calls this directly

Calls 2

git_parse_maybe_boolFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected