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

Function write_cached_object

builtin/unpack-objects.c:203–211  ·  view source on GitHub ↗

* Called only from check_object() after it verified this object * is Ok. */

Source from the content-addressed store, hash-verified

201 * is Ok.
202 */
203static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf)
204{
205 struct object_id oid;
206
207 if (odb_write_object(the_repository->objects, obj_buf->buffer, obj_buf->size,
208 obj->type, &oid) < 0)
209 die("failed to write object %s", oid_to_hex(&obj->oid));
210 obj->flags |= FLAG_WRITTEN;
211}
212
213/*
214 * At the very end of the processing, write_rest() scans the objects

Callers 1

check_objectFunction · 0.85

Calls 3

odb_write_objectFunction · 0.85
oid_to_hexFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected