| 336 | } |
| 337 | |
| 338 | static void write_note_to_worktree(const struct object_id *obj, |
| 339 | const struct object_id *note) |
| 340 | { |
| 341 | enum object_type type; |
| 342 | size_t size; |
| 343 | void *buf = odb_read_object(the_repository->objects, note, &type, &size); |
| 344 | |
| 345 | if (!buf) |
| 346 | die("cannot read note %s for object %s", |
| 347 | oid_to_hex(note), oid_to_hex(obj)); |
| 348 | if (type != OBJ_BLOB) |
| 349 | die("blob expected in note %s for object %s", |
| 350 | oid_to_hex(note), oid_to_hex(obj)); |
| 351 | write_buf_to_worktree(obj, buf, size); |
| 352 | free(buf); |
| 353 | } |
| 354 | |
| 355 | static int ll_merge_in_worktree(struct notes_merge_options *o, |
| 356 | struct notes_merge_pair *p) |
no test coverage detected