Uh oh!
There was an error while loading. Please reload this page.
Expand file tree
/
Copy pathcommit-graph.h
More file actions
Latest commit
56 lines (44 loc) · 1.34 KB
/
Copy pathcommit-graph.h
File metadata and controls
56 lines (44 loc) · 1.34 KB
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
#ifndefCOMMIT_GRAPH_H
#defineCOMMIT_GRAPH_H
#include"git-compat-util.h"
char*get_commit_graph_filename(constchar*obj_dir);
/*
* Given a commit struct, try to fill the commit struct info, including:
* 1. tree object
* 2. date
* 3. parents.
*
* Returns 1 if and only if the commit was found in the packed graph.
*
* See parse_commit_buffer() for the fallback after this call.
*/
intparse_commit_in_graph(structcommit*item);
/*
* It is possible that we loaded commit contents from the commit buffer,
* but we also want to ensure the commit-graph content is correctly
* checked and filled. Fill the graph_pos and generation members of
* the given commit.
*/
voidload_commit_graph_info(structcommit*item);
structtree*get_commit_tree_in_graph(conststructcommit*c);
structcommit_graph {
intgraph_fd;
constunsigned char*data;
size_tdata_len;
unsigned charhash_len;
unsigned charnum_chunks;
uint32_tnum_commits;
structobject_idoid;
constuint32_t*chunk_oid_fanout;
constunsigned char*chunk_oid_lookup;
constunsigned char*chunk_commit_data;
constunsigned char*chunk_large_edges;
};
structcommit_graph*load_commit_graph_one(constchar*graph_file);
voidwrite_commit_graph(constchar*obj_dir,
constchar**pack_indexes,
intnr_packs,
constchar**commit_hex,
intnr_commits,
intappend);
#endif