]> git.ipfire.org Git - thirdparty/git.git/blame - sha1-array.h
Merge tag 'l10n-2.24.0-rnd2' of https://github.com/git-l10n/git-po
[thirdparty/git.git] / sha1-array.h
CommitLineData
902bb364
JK
1#ifndef SHA1_ARRAY_H
2#define SHA1_ARRAY_H
3
910650d2 4struct oid_array {
ee3051bd 5 struct object_id *oid;
902bb364
JK
6 int nr;
7 int alloc;
8 int sorted;
9};
10
910650d2 11#define OID_ARRAY_INIT { NULL, 0, 0, 0 }
902bb364 12
910650d2 13void oid_array_append(struct oid_array *array, const struct object_id *oid);
14int oid_array_lookup(struct oid_array *array, const struct object_id *oid);
15void oid_array_clear(struct oid_array *array);
902bb364 16
1b7ba794 17typedef int (*for_each_oid_fn)(const struct object_id *oid,
18 void *data);
5cc044e0
ÆAB
19int oid_array_for_each(struct oid_array *array,
20 for_each_oid_fn fn,
21 void *data);
910650d2 22int oid_array_for_each_unique(struct oid_array *array,
72486729
ÆAB
23 for_each_oid_fn fn,
24 void *data);
161b1cf3
SB
25void oid_array_filter(struct oid_array *array,
26 for_each_oid_fn want,
27 void *cbdata);
cff38a5e 28
902bb364 29#endif /* SHA1_ARRAY_H */