MCPcopy Index your code
hub / github.com/git/git / write_object_file_prepare

Function write_object_file_prepare

object-file.c:329–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329void write_object_file_prepare(const struct git_hash_algo *algo,
330 const void *buf, unsigned long len,
331 enum object_type type, struct object_id *oid,
332 char *hdr, int *hdrlen)
333{
334 struct git_hash_ctx c;
335
336 /* Generate the header */
337 *hdrlen = format_object_header(hdr, *hdrlen, type, len);
338
339 /* Sha1.. */
340 hash_object_body(algo, &c, buf, len, oid, hdr, hdrlen);
341}
342
343#define CHECK_COLLISION_DEST_VANISHED -2
344

Callers 2

hash_object_fileFunction · 0.85

Calls 2

format_object_headerFunction · 0.85
hash_object_bodyFunction · 0.85

Tested by

no test coverage detected