sha1_file: move delta base cache code up
[git/raj.git] / patch-ids.h
blobb9e5751f8e2f6ef17bfa444fe6d8f3f2c6b7bb85
1 #ifndef PATCH_IDS_H
2 #define PATCH_IDS_H
4 struct patch_id {
5 struct hashmap_entry ent;
6 unsigned char patch_id[GIT_MAX_RAWSZ];
7 struct commit *commit;
8 };
10 struct patch_ids {
11 struct hashmap patches;
12 struct diff_options diffopts;
15 int commit_patch_id(struct commit *commit, struct diff_options *options,
16 unsigned char *sha1, int);
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 *);
22 #endif /* PATCH_IDS_H */