]>
Commit | Line | Data |
---|---|---|
902bb364 JK |
1 | #ifndef SHA1_ARRAY_H |
2 | #define SHA1_ARRAY_H | |
3 | ||
4 | struct sha1_array { | |
ee3051bd | 5 | struct object_id *oid; |
902bb364 JK |
6 | int nr; |
7 | int alloc; | |
8 | int sorted; | |
9 | }; | |
10 | ||
11 | #define SHA1_ARRAY_INIT { NULL, 0, 0, 0 } | |
12 | ||
98a72ddc | 13 | void sha1_array_append(struct sha1_array *array, const struct object_id *oid); |
5d3206d5 | 14 | int sha1_array_lookup(struct sha1_array *array, const struct object_id *oid); |
902bb364 JK |
15 | void sha1_array_clear(struct sha1_array *array); |
16 | ||
16ddcd40 | 17 | typedef int (*for_each_sha1_fn)(const unsigned char sha1[20], |
cff38a5e | 18 | void *data); |
16ddcd40 JK |
19 | int sha1_array_for_each_unique(struct sha1_array *array, |
20 | for_each_sha1_fn fn, | |
21 | void *data); | |
cff38a5e | 22 | |
902bb364 | 23 | #endif /* SHA1_ARRAY_H */ |