bisect: refactor sha1_array into a generic sha1 list
[git/git.git] / sha1-array.h
CommitLineData
902bb364
JK
1#ifndef SHA1_ARRAY_H
2#define SHA1_ARRAY_H
3
4struct sha1_array {
5 unsigned char (*sha1)[20];
6 int nr;
7 int alloc;
8 int sorted;
9};
10
11#define SHA1_ARRAY_INIT { NULL, 0, 0, 0 }
12
13void sha1_array_append(struct sha1_array *array, const unsigned char *sha1);
14void sha1_array_sort(struct sha1_array *array);
15int sha1_array_lookup(struct sha1_array *array, const unsigned char *sha1);
16void sha1_array_clear(struct sha1_array *array);
17
18#endif /* SHA1_ARRAY_H */