]> git.ipfire.org Git - thirdparty/git.git/blame - commit-graph.h
t/lib-git-daemon: fix signal checking
[thirdparty/git.git] / commit-graph.h
CommitLineData
08fd81c9
DS
1#ifndef COMMIT_GRAPH_H
2#define COMMIT_GRAPH_H
3
2a2e32bd
DS
4#include "git-compat-util.h"
5
6char *get_commit_graph_filename(const char *obj_dir);
7
177722b3
DS
8/*
9 * Given a commit struct, try to fill the commit struct info, including:
10 * 1. tree object
11 * 2. date
12 * 3. parents.
13 *
14 * Returns 1 if and only if the commit was found in the packed graph.
15 *
16 * See parse_commit_buffer() for the fallback after this call.
17 */
18int parse_commit_in_graph(struct commit *item);
19
7b8a21db
DS
20struct tree *get_commit_tree_in_graph(const struct commit *c);
21
2a2e32bd
DS
22struct commit_graph {
23 int graph_fd;
24
25 const unsigned char *data;
26 size_t data_len;
27
28 unsigned char hash_len;
29 unsigned char num_chunks;
30 uint32_t num_commits;
31 struct object_id oid;
32
33 const uint32_t *chunk_oid_fanout;
34 const unsigned char *chunk_oid_lookup;
35 const unsigned char *chunk_commit_data;
36 const unsigned char *chunk_large_edges;
37};
38
39struct commit_graph *load_commit_graph_one(const char *graph_file);
40
049d51a2
DS
41void write_commit_graph(const char *obj_dir,
42 const char **pack_indexes,
3d5df01b
DS
43 int nr_packs,
44 const char **commit_hex,
7547b95b
DS
45 int nr_commits,
46 int append);
08fd81c9
DS
47
48#endif