| 528 | } |
| 529 | |
| 530 | struct hashfile *create_tmp_packfile(struct repository *repo, |
| 531 | char **pack_tmp_name) |
| 532 | { |
| 533 | struct strbuf tmpname = STRBUF_INIT; |
| 534 | int fd; |
| 535 | |
| 536 | fd = odb_mkstemp(repo->objects, &tmpname, "pack/tmp_pack_XXXXXX"); |
| 537 | *pack_tmp_name = strbuf_detach(&tmpname, NULL); |
| 538 | return hashfd(repo->hash_algo, fd, *pack_tmp_name); |
| 539 | } |
| 540 | |
| 541 | static void rename_tmp_packfile(struct repository *repo, |
| 542 | struct strbuf *name_prefix, const char *source, |
no test coverage detected