| 327 | } |
| 328 | |
| 329 | void 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 |
no test coverage detected