Junio C Hamano | 5d23e13 | 2007-04-09 17:01:27 -0700 | [diff] [blame] | 1 | #ifndef PATCH_IDS_H |
| 2 | #define PATCH_IDS_H |
| 3 | |
| 4 | struct patch_id { |
Kevin Willford | dfb7a1b | 2016-07-29 12:19:17 -0400 | [diff] [blame] | 5 | struct hashmap_entry ent; |
Brandon Williams | 34f3c0e | 2017-05-30 10:30:53 -0700 | [diff] [blame] | 6 | struct object_id patch_id; |
Kevin Willford | 683f17e | 2016-07-29 12:19:18 -0400 | [diff] [blame] | 7 | struct commit *commit; |
Junio C Hamano | 5d23e13 | 2007-04-09 17:01:27 -0700 | [diff] [blame] | 8 | }; |
| 9 | |
| 10 | struct patch_ids { |
Kevin Willford | dfb7a1b | 2016-07-29 12:19:17 -0400 | [diff] [blame] | 11 | struct hashmap patches; |
Junio C Hamano | 5d23e13 | 2007-04-09 17:01:27 -0700 | [diff] [blame] | 12 | struct diff_options diffopts; |
Junio C Hamano | 5d23e13 | 2007-04-09 17:01:27 -0700 | [diff] [blame] | 13 | }; |
| 14 | |
Xiaolong Ye | ded2c09 | 2016-04-26 15:51:21 +0800 | [diff] [blame] | 15 | int commit_patch_id(struct commit *commit, struct diff_options *options, |
Brandon Williams | 34f3c0e | 2017-05-30 10:30:53 -0700 | [diff] [blame] | 16 | struct object_id *oid, int); |
Junio C Hamano | 5d23e13 | 2007-04-09 17:01:27 -0700 | [diff] [blame] | 17 | int init_patch_ids(struct patch_ids *); |
| 18 | int free_patch_ids(struct patch_ids *); |
| 19 | struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *); |
| 20 | struct patch_id *has_commit_patch_id(struct commit *, struct patch_ids *); |
| 21 | |
| 22 | #endif /* PATCH_IDS_H */ |