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

Function create_tmp_packfile

pack-write.c:530–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530struct 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
541static void rename_tmp_packfile(struct repository *repo,
542 struct strbuf *name_prefix, const char *source,

Callers 2

write_pack_fileFunction · 0.85

Calls 3

odb_mkstempFunction · 0.85
strbuf_detachFunction · 0.85
hashfdFunction · 0.85

Tested by

no test coverage detected