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

Function mode34_callback

t/helper/test-parse-options.c:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22} length_cb;
23
24static int mode34_callback(const struct option *opt, const char *arg, int unset)
25{
26 if (unset)
27 *(int *)opt->value = 0;
28 else if (!strcmp(arg, "3"))
29 *(int *)opt->value = 3;
30 else if (!strcmp(arg, "4"))
31 *(int *)opt->value = 4;
32 else
33 return error("invalid value for '%s': '%s'", "--mode34", arg);
34 return 0;
35}
36
37static int length_callback(const struct option *opt, const char *arg, int unset)
38{

Callers

nothing calls this directly

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected