git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
d42f077998d38820e2656815df84ad77e102edc5 blob 1800 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
 
#!/bin/sh

test_description='git log for a path with bloom filters'
. ./test-lib.sh

test_expect_success 'setup repo' '
	git init &&
	git config core.commitGraph true &&
	git config gc.writeCommitGraph false &&
	infodir=".git/objects/info" &&
	graphdir="$infodir/commit-graphs" &&
	test_oid_init
'

test_expect_success 'create 9 commits and repack' '
	test_commit c1 file1 &&
	test_commit c2 file2 &&
	test_commit c3 file3 &&
	test_commit c4 file1 &&
	test_commit c5 file2 &&
	test_commit c6 file3 &&
	test_commit c7 file1 &&
	test_commit c8 file2 &&
	test_commit c9 file3
'

printf "c7\nc4\nc1" > expect_file1

test_expect_success 'log without bloom filters' '
	git log --pretty="format:%s"  -- file1 > actual &&
	test_cmp expect_file1 actual
'

printf "c8\nc7\nc5\nc4\nc2\nc1" > expect_file1_file2

test_expect_success 'multi-path log without bloom filters' '
	git log --pretty="format:%s"  -- file1 file2 > actual &&
	test_cmp expect_file1_file2 actual
'

graph_read_expect() {
	OPTIONAL=""
	NUM_CHUNKS=5
	if test ! -z $2
	then
		OPTIONAL=" $2"
		NUM_CHUNKS=$((3 + $(echo "$2" | wc -w)))
	fi
	cat >expect <<- EOF
	header: 43475048 1 1 $NUM_CHUNKS 0
	num_commits: $1
	chunks: oid_fanout oid_lookup commit_metadata bloom_indexes bloom_data$OPTIONAL
	EOF
	test-tool read-graph >output &&
	test_cmp expect output
}

test_expect_success 'write commit graph with bloom filters' '
	git commit-graph write --reachable --changed-paths &&
	test_path_is_file $infodir/commit-graph &&
	graph_read_expect "9"
'

test_expect_success 'log using bloom filters' '
	git log --pretty="format:%s" -- file1 > actual &&
	test_cmp expect_file1 actual
'

test_expect_success 'multi-path log using bloom filters' '
	git log --pretty="format:%s"  -- file1 file2 > actual &&
	test_cmp expect_file1_file2 actual
'

test_done
debug log:

solving d42f077998 ...
found d42f077998 in https://public-inbox.org/git/72a2bbf6765a1e99a3a23372f801099a07fe11a5.1576879520.git.gitgitgadget@gmail.com/

applying [1/1] https://public-inbox.org/git/72a2bbf6765a1e99a3a23372f801099a07fe11a5.1576879520.git.gitgitgadget@gmail.com/
diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh
new file mode 100755
index 0000000000..d42f077998

Checking patch t/t4216-log-bloom.sh...
Applied patch t/t4216-log-bloom.sh cleanly.

index at:
100755 d42f077998d38820e2656815df84ad77e102edc5	t/t4216-log-bloom.sh

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

Archives are clonable:
	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

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

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