blob: eeb56b307f602773a41ea3b8cb22d89959c4f9d9 [file] [log] [blame]
Junio C Hamano5d23e132007-04-09 17:01:27 -07001#ifndef PATCH_IDS_H
2#define PATCH_IDS_H
3
4struct patch_id {
5 unsigned char patch_id[20];
6 char seen;
7};
8
9struct patch_ids {
10 struct diff_options diffopts;
11 int nr, alloc;
12 struct patch_id **table;
13 struct patch_id_bucket *patches;
14};
15
Xiaolong Yeded2c092016-04-26 15:51:21 +080016int commit_patch_id(struct commit *commit, struct diff_options *options,
17 unsigned char *sha1);
Junio C Hamano5d23e132007-04-09 17:01:27 -070018int init_patch_ids(struct patch_ids *);
19int free_patch_ids(struct patch_ids *);
20struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);
21struct patch_id *has_commit_patch_id(struct commit *, struct patch_ids *);
22
23#endif /* PATCH_IDS_H */