git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
e0673938c05d2e15cf6c66223f262f7206f16001 blob 2832 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
 
#include "cache.h"
#include "config.h"
#include "repository.h"

#define UPDATE_DEFAULT(s,v) do { if (s == -1) { s = v; } } while(0)

void prepare_repo_settings(struct repository *r)
{
	int value;
	char *strval;

	if (r->settings.initialized)
		return;

	/* Defaults */
	memset(&r->settings, -1, sizeof(r->settings));

	if (!repo_config_get_bool(r, "core.commitgraph", &value))
		r->settings.core_commit_graph = value;
	if (!repo_config_get_bool(r, "gc.writecommitgraph", &value))
		r->settings.gc_write_commit_graph = value;

	if (!repo_config_get_bool(r, "index.version", &value))
		r->settings.index_version = value;
	if (!repo_config_get_maybe_bool(r, "core.untrackedcache", &value)) {
		if (value == 0)
			r->settings.core_untracked_cache = UNTRACKED_CACHE_REMOVE;
		else
			r->settings.core_untracked_cache = UNTRACKED_CACHE_WRITE;
	} else if (!repo_config_get_string(r, "core.untrackedcache", &strval)) {
		if (!strcasecmp(strval, "keep"))
			r->settings.core_untracked_cache = UNTRACKED_CACHE_KEEP;

		free(strval);
	}

	if (!repo_config_get_maybe_bool(r, "merge.directoryrenames", &value))
		r->settings.merge_directory_renames = value ? MERGE_DIRECTORY_RENAMES_TRUE : 0;
	else if (!repo_config_get_string(r, "merge.directoryrenames", &strval)) {
		if (!strcasecmp(strval, "conflict"))
			r->settings.merge_directory_renames = MERGE_DIRECTORY_RENAMES_CONFLICT;
	}
	if (!repo_config_get_string(r, "fetch.negotiationalgorithm", &strval)) {
		if (!strcasecmp(strval, "skipping"))
			r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_SKIPPING;
		else
			r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_DEFAULT;
	}

	if (!repo_config_get_bool(r, "pack.usesparse", &value))
		r->settings.pack_use_sparse = value;
	
	if (!repo_config_get_bool(r, "feature.manycommits", &value) && value) {
		UPDATE_DEFAULT(r->settings.core_commit_graph, 1);
		UPDATE_DEFAULT(r->settings.gc_write_commit_graph, 1);
	}
	if (!repo_config_get_bool(r, "feature.manyfiles", &value) && value) {
		UPDATE_DEFAULT(r->settings.index_version, 4);
		UPDATE_DEFAULT(r->settings.core_untracked_cache, UNTRACKED_CACHE_WRITE);
	}
	if (!repo_config_get_bool(r, "feature.experimental", &value) && value) {
		UPDATE_DEFAULT(r->settings.pack_use_sparse, 1);
		UPDATE_DEFAULT(r->settings.merge_directory_renames, MERGE_DIRECTORY_RENAMES_TRUE);
		UPDATE_DEFAULT(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_SKIPPING);
	}

	/* Hack for test programs like test-dump-untracked-cache */
	if (ignore_untracked_cache_config)
		r->settings.core_untracked_cache = UNTRACKED_CACHE_KEEP;
	else
		UPDATE_DEFAULT(r->settings.core_untracked_cache, UNTRACKED_CACHE_KEEP);

	UPDATE_DEFAULT(r->settings.merge_directory_renames, MERGE_DIRECTORY_RENAMES_CONFLICT);
	UPDATE_DEFAULT(r->settings.fetch_negotiation_algorithm, FETCH_NEGOTIATION_DEFAULT);
}
debug log:

solving e0673938c0 ...
found e0673938c0 in https://public-inbox.org/git/2e153fac22dc5c27fc85efc802785edc0c9d78ad.1564515324.git.gitgitgadget@gmail.com/
found af93696343 in https://public-inbox.org/git/0d4774d45fee108981a4ad7316367f78c9f23fa1.1564515324.git.gitgitgadget@gmail.com/
found 9ed83e6e54 in https://public-inbox.org/git/b0a2d0e18800da01ab1b17faca34eb011fb36128.1564515324.git.gitgitgadget@gmail.com/
found fc05f4fbc4 in https://public-inbox.org/git/c0129066a02b39535110ae592c16ca0e5d6d6c24.1564515324.git.gitgitgadget@gmail.com/
found 309577f6bc in git.git.git
preparing index
index prepared:
100644 309577f6bceeab4a436e64b49a011061863af02e	repo-settings.c

applying [1/4] https://public-inbox.org/git/c0129066a02b39535110ae592c16ca0e5d6d6c24.1564515324.git.gitgitgadget@gmail.com/
diff --git a/repo-settings.c b/repo-settings.c
index 309577f6bc..fc05f4fbc4 100644


applying [2/4] https://public-inbox.org/git/b0a2d0e18800da01ab1b17faca34eb011fb36128.1564515324.git.gitgitgadget@gmail.com/
diff --git a/repo-settings.c b/repo-settings.c
index fc05f4fbc4..9ed83e6e54 100644


applying [3/4] https://public-inbox.org/git/0d4774d45fee108981a4ad7316367f78c9f23fa1.1564515324.git.gitgitgadget@gmail.com/
diff --git a/repo-settings.c b/repo-settings.c
index 9ed83e6e54..af93696343 100644


applying [4/4] https://public-inbox.org/git/2e153fac22dc5c27fc85efc802785edc0c9d78ad.1564515324.git.gitgitgadget@gmail.com/
diff --git a/repo-settings.c b/repo-settings.c
index af93696343..e0673938c0 100644

Checking patch repo-settings.c...
Applied patch repo-settings.c cleanly.
3:57: trailing whitespace.
	
Checking patch repo-settings.c...
Applied patch repo-settings.c cleanly.
Checking patch repo-settings.c...
Applied patch repo-settings.c cleanly.
Checking patch repo-settings.c...
Applied patch repo-settings.c cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 e0673938c05d2e15cf6c66223f262f7206f16001	repo-settings.c

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

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

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git