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

Function optname

parse-options.c:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30static const char *optname(const struct option *opt, enum opt_parsed flags)
31{
32 static struct strbuf sb = STRBUF_INIT;
33
34 strbuf_reset(&sb);
35 if (flags & OPT_SHORT)
36 strbuf_addf(&sb, "switch `%c'", opt->short_name);
37 else if (flags & OPT_UNSET)
38 strbuf_addf(&sb, "option `no-%s'", opt->long_name);
39 else if (flags == OPT_LONG)
40 strbuf_addf(&sb, "option `%s'", opt->long_name);
41 else
42 BUG("optname() got unknown flags %d", flags);
43
44 return sb.buf;
45}
46
47static enum parse_opt_result get_arg(struct parse_opt_ctx_t *p,
48 const struct option *opt,

Callers 4

get_argFunction · 0.85
get_int_valueFunction · 0.85
set_int_valueFunction · 0.85
do_get_valueFunction · 0.85

Calls 1

strbuf_addfFunction · 0.85

Tested by

no test coverage detected