sha1-array.hon commit Merge branch 'bw/pathspec-match-submodule-boundary' (f4f233e)
   1#ifndef SHA1_ARRAY_H
   2#define SHA1_ARRAY_H
   3
   4struct oid_array {
   5        struct object_id *oid;
   6        int nr;
   7        int alloc;
   8        int sorted;
   9};
  10
  11#define OID_ARRAY_INIT { NULL, 0, 0, 0 }
  12
  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);
  16
  17typedef int (*for_each_oid_fn)(const struct object_id *oid,
  18                               void *data);
  19int oid_array_for_each_unique(struct oid_array *array,
  20                               for_each_oid_fn fn,
  21                               void *data);
  22
  23#endif /* SHA1_ARRAY_H */