| 12 | } |
| 13 | |
| 14 | int commit_patch_id(struct commit *commit, struct diff_options *options, |
| 15 | struct object_id *oid, int diff_header_only) |
| 16 | { |
| 17 | if (!patch_id_defined(commit)) |
| 18 | return -1; |
| 19 | |
| 20 | if (commit->parents) |
| 21 | diff_tree_oid(&commit->parents->item->object.oid, |
| 22 | &commit->object.oid, "", options); |
| 23 | else |
| 24 | diff_root_tree_oid(&commit->object.oid, "", options); |
| 25 | diffcore_std(options); |
| 26 | return diff_flush_patch_id(options, oid, diff_header_only); |
| 27 | } |
| 28 | |
| 29 | /* |
| 30 | * When we cannot load the full patch-id for both commits for whatever |
no test coverage detected