5 * Parses textual value for pull.rebase, branch.<name>.rebase, etc.
6 * Unrecognised value yields REBASE_INVALID, which traditionally is
7 * treated the same way as REBASE_FALSE.
9 * The callers that care if (any) rebase is requested should say
10 * if (REBASE_TRUE <= rebase_parse_value(string))
12 * The callers that want to differenciate an unrecognised value and
13 * false can do so by treating _INVALID and _FALSE differently.
15 enum rebase_type rebase_parse_value(const char *value)
17 int v = git_parse_maybe_bool(value);
23 else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
24 return REBASE_PRESERVE;
25 else if (!strcmp(value, "merges") || !strcmp(value, "m"))
27 else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
28 return REBASE_INTERACTIVE;
30 * Please update _git_config() in git-completion.bash when you
31 * add new rebase modes.
34 return REBASE_INVALID;