Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (18 sloc) 0.583 kB
902bb36 @peff bisect: refactor sha1_array into a generic sha1 list
peff authored
1 #ifndef SHA1_ARRAY_H
2 #define SHA1_ARRAY_H
3
4 struct 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
13 void sha1_array_append(struct sha1_array *array, const unsigned char *sha1);
14 int sha1_array_lookup(struct sha1_array *array, const unsigned char *sha1);
15 void sha1_array_clear(struct sha1_array *array);
16
cff38a5 @peff receive-pack: eliminate duplicate .have refs
peff authored
17 typedef void (*for_each_sha1_fn)(const unsigned char sha1[20],
18 void *data);
19 void sha1_array_for_each_unique(struct sha1_array *array,
20 for_each_sha1_fn fn,
21 void *data);
22
902bb36 @peff bisect: refactor sha1_array into a generic sha1 list
peff authored
23 #endif /* SHA1_ARRAY_H */
Something went wrong with that request. Please try again.