git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
1c2a5366c768f08cff92b774db0a5c2fdaf7428f blob 1131 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
 
#include "test-tool.h"
#include "cache.h"
#include "commit-graph.h"
#include "repository.h"
#include "object-store.h"

int cmd__read_graph(int argc, const char **argv)
{
	struct commit_graph *graph = NULL;
	struct object_directory *odb;

	setup_git_directory();
	odb = the_repository->objects->odb;

	graph = read_commit_graph_one(the_repository, odb);
	if (!graph)
		return 1;


	printf("header: %08x %d %d %d %d\n",
		ntohl(*(uint32_t*)graph->data),
		*(unsigned char*)(graph->data + 4),
		*(unsigned char*)(graph->data + 5),
		*(unsigned char*)(graph->data + 6),
		*(unsigned char*)(graph->data + 7));
	printf("num_commits: %u\n", graph->num_commits);
	printf("chunks:");

	if (graph->chunk_oid_fanout)
		printf(" oid_fanout");
	if (graph->chunk_oid_lookup)
		printf(" oid_lookup");
	if (graph->chunk_commit_data)
		printf(" commit_metadata");
	if (graph->chunk_generation_data)
		printf(" generation_data");
	if (graph->chunk_extra_edges)
		printf(" extra_edges");
	if (graph->chunk_bloom_indexes)
		printf(" bloom_indexes");
	if (graph->chunk_bloom_data)
		printf(" bloom_data");
	printf("\n");

	UNLEAK(graph);

	return 0;
}
debug log:

solving 1c2a5366c7 ...
found 1c2a5366c7 in https://public-inbox.org/git/80ea7da3435396edcb19423ab602962d31585209.1595927632.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/cb797e20d79e9dcd3e0b953e0db3ed1defb9aa7c.1596941625.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/4e746628acdb49af5e8eb788864156f54724d4fa.1597509583.git.gitgitgadget@gmail.com/
found 6d0c962438 in git.git.git
preparing index
index prepared:
100644 6d0c962438bac9510fc55857eb44736a0284a1b1	t/helper/test-read-graph.c

applying [1/3] https://public-inbox.org/git/80ea7da3435396edcb19423ab602962d31585209.1595927632.git.gitgitgadget@gmail.com/
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index 6d0c962438..1c2a5366c7 100644

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

skipping https://public-inbox.org/git/cb797e20d79e9dcd3e0b953e0db3ed1defb9aa7c.1596941625.git.gitgitgadget@gmail.com/ for 1c2a5366c7
skipping https://public-inbox.org/git/4e746628acdb49af5e8eb788864156f54724d4fa.1597509583.git.gitgitgadget@gmail.com/ for 1c2a5366c7
index at:
100644 1c2a5366c768f08cff92b774db0a5c2fdaf7428f	t/helper/test-read-graph.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).