| 362 | } |
| 363 | |
| 364 | off_t write_pack_header(struct hashfile *f, uint32_t nr_entries) |
| 365 | { |
| 366 | struct pack_header hdr; |
| 367 | |
| 368 | hdr.hdr_signature = htonl(PACK_SIGNATURE); |
| 369 | hdr.hdr_version = htonl(PACK_VERSION); |
| 370 | hdr.hdr_entries = htonl(nr_entries); |
| 371 | hashwrite(f, &hdr, sizeof(hdr)); |
| 372 | return sizeof(hdr); |
| 373 | } |
| 374 | |
| 375 | /* |
| 376 | * Update pack header with object_count and compute new SHA1 for pack data |