Squashed 'third_party/git/' content from commit cb71568594
git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7
This commit is contained in:
commit
1b593e1ea4
3629 changed files with 1139935 additions and 0 deletions
29
sha1-array.h
Normal file
29
sha1-array.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef SHA1_ARRAY_H
|
||||
#define SHA1_ARRAY_H
|
||||
|
||||
struct oid_array {
|
||||
struct object_id *oid;
|
||||
int nr;
|
||||
int alloc;
|
||||
int sorted;
|
||||
};
|
||||
|
||||
#define OID_ARRAY_INIT { NULL, 0, 0, 0 }
|
||||
|
||||
void oid_array_append(struct oid_array *array, const struct object_id *oid);
|
||||
int oid_array_lookup(struct oid_array *array, const struct object_id *oid);
|
||||
void oid_array_clear(struct oid_array *array);
|
||||
|
||||
typedef int (*for_each_oid_fn)(const struct object_id *oid,
|
||||
void *data);
|
||||
int oid_array_for_each(struct oid_array *array,
|
||||
for_each_oid_fn fn,
|
||||
void *data);
|
||||
int oid_array_for_each_unique(struct oid_array *array,
|
||||
for_each_oid_fn fn,
|
||||
void *data);
|
||||
void oid_array_filter(struct oid_array *array,
|
||||
for_each_oid_fn want,
|
||||
void *cbdata);
|
||||
|
||||
#endif /* SHA1_ARRAY_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue