git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
d1bb7290aef6e405a094e6516c2858b991d358e2 blob 976 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
 
/*
 * test-mktemp.c: code to exercise the creation of temporary files
 */
#include "test-tool.h"
#include "cache.h"
#include "midx.h"
#include "repository.h"
#include "object-store.h"

static int read_midx_file(const char *object_dir)
{
	uint32_t i;
	struct multi_pack_index *m = load_multi_pack_index(object_dir);

	if (!m)
		return 0;

	printf("header: %08x %d %d %d\n",
	       m->signature,
	       m->version,
	       m->num_chunks,
	       m->num_packs);

	printf("chunks:");

	if (m->chunk_pack_names)
		printf(" pack_names");
	if (m->chunk_oid_fanout)
		printf(" oid_fanout");
	if (m->chunk_oid_lookup)
		printf(" oid_lookup");

	printf("\nnum_objects: %d\n", m->num_objects);

	printf("packs:\n");
	for (i = 0; i < m->num_packs; i++)
		printf("%s\n", m->pack_names[i]);

	printf("object_dir: %s\n", m->object_dir);

	return 0;
}

int cmd__read_midx(int argc, const char **argv)
{
	if (argc != 2)
		usage("read-midx <object_dir>");

	return read_midx_file(argv[1]);
}
debug log:

solving d1bb7290ae ...
found d1bb7290ae in https://public-inbox.org/git/20180706005321.124643-15-dstolee@microsoft.com/
found 60bca5b668 in https://public-inbox.org/git/20180706005321.124643-14-dstolee@microsoft.com/
found 0b53a9e8b5 in https://public-inbox.org/git/20180706005321.124643-12-dstolee@microsoft.com/
found a9232d8219 in https://public-inbox.org/git/20180706005321.124643-11-dstolee@microsoft.com/
found 5abf969175 in https://public-inbox.org/git/20180625143434.89044-7-dstolee@microsoft.com/

applying [1/5] https://public-inbox.org/git/20180625143434.89044-7-dstolee@microsoft.com/
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
new file mode 100644
index 0000000000..5abf969175


applying [2/5] https://public-inbox.org/git/20180706005321.124643-11-dstolee@microsoft.com/
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 5abf969175..a9232d8219 100644


applying [3/5] https://public-inbox.org/git/20180706005321.124643-12-dstolee@microsoft.com/
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index a9232d8219..0b53a9e8b5 100644


applying [4/5] https://public-inbox.org/git/20180706005321.124643-14-dstolee@microsoft.com/
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 0b53a9e8b5..60bca5b668 100644


applying [5/5] https://public-inbox.org/git/20180706005321.124643-15-dstolee@microsoft.com/
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 60bca5b668..d1bb7290ae 100644

Checking patch t/helper/test-read-midx.c...
Applied patch t/helper/test-read-midx.c cleanly.
Checking patch t/helper/test-read-midx.c...
Applied patch t/helper/test-read-midx.c cleanly.
Checking patch t/helper/test-read-midx.c...
Applied patch t/helper/test-read-midx.c cleanly.
Checking patch t/helper/test-read-midx.c...
Applied patch t/helper/test-read-midx.c cleanly.
Checking patch t/helper/test-read-midx.c...
Applied patch t/helper/test-read-midx.c cleanly.

index at:
100644 d1bb7290aef6e405a094e6516c2858b991d358e2	t/helper/test-read-midx.c

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

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.org/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