[PATCH] diffcore-pickaxe: switch to "counting" behaviour.
[alt-git.git] / rev-cache.h
blobb238ac640c2a99f5bdd099a038207bb9b4552cbe
1 #ifndef REV_CACHE_H
2 #define REV_CACHE_H
4 extern struct rev_cache {
5 struct rev_cache *head_list;
6 struct rev_list_elem *children;
7 struct rev_list_elem *parents;
8 struct rev_list_elem *parents_tail;
9 unsigned short num_parents;
10 unsigned short num_children;
11 unsigned int written : 1;
12 unsigned int parsed : 1;
13 unsigned int work : 30;
14 void *work_ptr;
15 unsigned char sha1[20];
16 } **rev_cache;
17 extern int nr_revs, alloc_revs;
19 struct rev_list_elem {
20 struct rev_list_elem *next;
21 struct rev_cache *ri;
24 extern int find_rev_cache(const unsigned char *);
25 extern int read_rev_cache(const char *, FILE *, int);
26 extern int record_rev_cache(const unsigned char *, FILE *);
27 extern void write_rev_cache(const char *new, const char *old);
29 #endif