| 52 | } |
| 53 | |
| 54 | static int verify_notes_filepair(struct diff_filepair *p, struct object_id *oid) |
| 55 | { |
| 56 | switch (p->status) { |
| 57 | case DIFF_STATUS_MODIFIED: |
| 58 | assert(p->one->mode == p->two->mode); |
| 59 | assert(!is_null_oid(&p->one->oid)); |
| 60 | assert(!is_null_oid(&p->two->oid)); |
| 61 | break; |
| 62 | case DIFF_STATUS_ADDED: |
| 63 | assert(is_null_oid(&p->one->oid)); |
| 64 | break; |
| 65 | case DIFF_STATUS_DELETED: |
| 66 | assert(is_null_oid(&p->two->oid)); |
| 67 | break; |
| 68 | default: |
| 69 | return -1; |
| 70 | } |
| 71 | assert(!strcmp(p->one->path, p->two->path)); |
| 72 | return path_to_oid(p->one->path, oid); |
| 73 | } |
| 74 | |
| 75 | static struct notes_merge_pair *find_notes_merge_pair_pos( |
| 76 | struct notes_merge_pair *list, int len, struct object_id *obj, |
no test coverage detected