Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/rebase.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / rebase.c` 37 lines ยท 1119 bytes Raw Blame History 1 #include "git-compat-util.h" 2 #include "rebase.h" 3 #include "parse.h" 4 #include "gettext.h" 5 6 /* 7 * Parses textual value for pull.rebase, branch..rebase, etc. 8 * Unrecognised value yields REBASE_INVALID, which traditionally is 9 * treated the same way as REBASE_FALSE. 10 * 11 * The callers that care if (any) rebase is requested should say 12 * if (REBASE_TRUE <= rebase_parse_value(string)) 13 * 14 * The callers that want to differentiate an unrecognised value and 15 * false can do so by treating _INVALID and _FALSE differently. 16 */ 17 enum rebase_type rebase_parse_value(const char *value) 18 { 19 int v = git_parse_maybe_bool(value); 20 21 if (!v) 22 return REBASE_FALSE; 23 else if (v > 0) 24 return REBASE_TRUE; 25 else if (!strcmp(value, "merges") || !strcmp(value, "m")) 26 return REBASE_MERGES; 27 else if (!strcmp(value, "interactive") || !strcmp(value, "i")) 28 return REBASE_INTERACTIVE; 29 else if (!strcmp(value, "preserve") || !strcmp(value, "p")) 30 error(_("%s: 'preserve' superseded by 'merges'"), value); 31 /* 32 * Please update _git_config() in git-completion.bash when you 33 * add new rebase modes. 34 */ 35 36 return REBASE_INVALID; 37 }