MCPcopy Create free account
hub / github.com/git/git / write_note_to_worktree

Function write_note_to_worktree

notes-merge.c:338–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338static 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
355static int ll_merge_in_worktree(struct notes_merge_options *o,
356 struct notes_merge_pair *p)

Callers 1

merge_one_change_manualFunction · 0.85

Calls 4

odb_read_objectFunction · 0.85
oid_to_hexFunction · 0.85
write_buf_to_worktreeFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected