blob: bec0f727a7bc4345e524ff04d9569c68fabd2209 [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 {
Kevin Willforddfb7a1b2016-07-29 12:19:17 -04005 struct hashmap_entry ent;
Brandon Williams34f3c0e2017-05-30 10:30:53 -07006 struct object_id patch_id;
Kevin Willford683f17e2016-07-29 12:19:18 -04007 struct commit *commit;
Junio C Hamano5d23e132007-04-09 17:01:27 -07008};
9
10struct patch_ids {
Kevin Willforddfb7a1b2016-07-29 12:19:17 -040011 struct hashmap patches;
Junio C Hamano5d23e132007-04-09 17:01:27 -070012 struct diff_options diffopts;
Junio C Hamano5d23e132007-04-09 17:01:27 -070013};
14
Xiaolong Yeded2c092016-04-26 15:51:21 +080015int commit_patch_id(struct commit *commit, struct diff_options *options,
Brandon Williams34f3c0e2017-05-30 10:30:53 -070016 struct object_id *oid, int);
Junio C Hamano5d23e132007-04-09 17:01:27 -070017int init_patch_ids(struct patch_ids *);
18int free_patch_ids(struct patch_ids *);
19struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);
20struct patch_id *has_commit_patch_id(struct commit *, struct patch_ids *);
21
22#endif /* PATCH_IDS_H */