6 * Parses textual value for pull.rebase, branch.<name>.rebase, etc.
7 * Unrecognised value yields REBASE_INVALID, which traditionally is
8 * treated the same way as REBASE_FALSE.
10 * The callers that care if (any) rebase is requested should say
11 * if (REBASE_TRUE <= rebase_parse_value(string))
13 * The callers that want to differenciate an unrecognised value and
14 * false can do so by treating _INVALID and _FALSE differently.
16 enum rebase_type
rebase_parse_value(const char *value
)
18 int v
= git_parse_maybe_bool(value
);
24 else if (!strcmp(value
, "merges") || !strcmp(value
, "m"))
26 else if (!strcmp(value
, "interactive") || !strcmp(value
, "i"))
27 return REBASE_INTERACTIVE
;
28 else if (!strcmp(value
, "preserve") || !strcmp(value
, "p"))
29 error(_("%s: 'preserve' superseded by 'merges'"), value
);
31 * Please update _git_config() in git-completion.bash when you
32 * add new rebase modes.
35 return REBASE_INVALID
;