git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
bdfca49886617ddb0d48166f02aec13b02cfec5a blob 1295 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
#include "rebase.h"
#include "config.h"

/*
 * Parses textual value for pull.rebase, branch.<name>.rebase, etc.
 * Unrecognised value yields REBASE_INVALID, which traditionally is
 * treated the same way as REBASE_FALSE.
 *
 * The callers that care if (any) rebase is requested should say
 *   if (REBASE_TRUE <= rebase_parse_value(string))
 *
 * The callers that want to differenciate an unrecognised value and
 * false can do so by treating _INVALID and _FALSE differently.
 */
enum rebase_type rebase_parse_value(const char *value)
{
	int v = git_parse_maybe_bool(value);

	if (!v)
		return REBASE_FALSE;
	else if (v > 0)
		return REBASE_TRUE;
	else if (!strcmp(value, "preserve") || !strcmp(value, "p"))
		return REBASE_PRESERVE;
	else if (!strcmp(value, "merges") || !strcmp(value, "m"))
		return REBASE_MERGES;
	else if (!strcmp(value, "interactive") || !strcmp(value, "i"))
		return REBASE_INTERACTIVE;
	/*
	 * Please update _git_config() in git-completion.bash when you
	 * add new rebase modes.
	 */

	return REBASE_INVALID;
}

enum pull_mode_type pull_mode_parse_value(const char *value)
{
	if (!strcmp(value, "merge") || !strcmp(value, "m"))
		return PULL_MODE_MERGE;
	else if (!strcmp(value, "rebase") || !strcmp(value, "r"))
		return PULL_MODE_REBASE;

	return PULL_MODE_INVALID;
}
debug log:

solving bdfca49886 ...
found bdfca49886 in https://public-inbox.org/git/20201125032938.786393-9-felipe.contreras@gmail.com/ ||
	https://public-inbox.org/git/20201208002648.1370414-17-felipe.contreras@gmail.com/ ||
	https://public-inbox.org/git/20210705123209.1808663-27-felipe.contreras@gmail.com/ ||
	https://public-inbox.org/git/20201218211026.1937168-11-felipe.contreras@gmail.com/
found f8137d859b in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 f8137d859b51114b75995f1c5c8f6cd282b1f3c4	rebase.c

applying [1/4] https://public-inbox.org/git/20201125032938.786393-9-felipe.contreras@gmail.com/
diff --git a/rebase.c b/rebase.c
index f8137d859b..bdfca49886 100644

Checking patch rebase.c...
Applied patch rebase.c cleanly.

skipping https://public-inbox.org/git/20201208002648.1370414-17-felipe.contreras@gmail.com/ for bdfca49886
skipping https://public-inbox.org/git/20210705123209.1808663-27-felipe.contreras@gmail.com/ for bdfca49886
skipping https://public-inbox.org/git/20201218211026.1937168-11-felipe.contreras@gmail.com/ for bdfca49886
index at:
100644 bdfca49886617ddb0d48166f02aec13b02cfec5a	rebase.c

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).