patch-ids.h 704 B

123456789101112131415161718192021222324252627282930
  1. #ifndef PATCH_IDS_H
  2. #define PATCH_IDS_H
  3. #include "diff.h"
  4. #include "hashmap.h"
  5. struct commit;
  6. struct object_id;
  7. struct repository;
  8. struct patch_id {
  9. struct hashmap_entry ent;
  10. struct object_id patch_id;
  11. struct commit *commit;
  12. };
  13. struct patch_ids {
  14. struct hashmap patches;
  15. struct diff_options diffopts;
  16. };
  17. int commit_patch_id(struct commit *commit, struct diff_options *options,
  18. struct object_id *oid, int, int);
  19. int init_patch_ids(struct repository *, struct patch_ids *);
  20. int free_patch_ids(struct patch_ids *);
  21. struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);
  22. struct patch_id *has_commit_patch_id(struct commit *, struct patch_ids *);
  23. #endif /* PATCH_IDS_H */