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

Function parse_config_rebase

builtin/pull.c:41–54  ·  view source on GitHub ↗

* Parses the value of --rebase. If value is a false value, returns * REBASE_FALSE. If value is a true value, returns REBASE_TRUE. If value is * "merges", returns REBASE_MERGES. If value is a invalid value, dies with * a fatal error if fatal is true, otherwise returns REBASE_INVALID. */

Source from the content-addressed store, hash-verified

39 * a fatal error if fatal is true, otherwise returns REBASE_INVALID.
40 */
41static enum rebase_type parse_config_rebase(const char *key, const char *value,
42 int fatal)
43{
44 enum rebase_type v = rebase_parse_value(value);
45 if (v != REBASE_INVALID)
46 return v;
47
48 if (fatal)
49 die(_("invalid value for '%s': '%s'"), key, value);
50 else
51 error(_("invalid value for '%s': '%s'"), key, value);
52
53 return REBASE_INVALID;
54}
55
56/**
57 * Callback for --rebase, which parses arg with parse_config_rebase().

Callers 2

parse_opt_rebaseFunction · 0.85
config_get_rebaseFunction · 0.85

Calls 3

rebase_parse_valueFunction · 0.85
errorFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected