summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-09-18 17:58:00 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-09-18 17:58:00 -0700
commit9b8074427bd2bb52d0c7ec876ebe0e6834bb69fe (patch)
tree2878fe56589a29032ac39c6d2c763452045f464b /builtin
parentFourteenth batch (diff)
parentpack-bitmap-write: use hashwrite_be32() in write_hash_cache() (diff)
downloadtgif-9b8074427bd2bb52d0c7ec876ebe0e6834bb69fe.tar.xz
Merge branch 'rs/misc-cleanups'
Misc cleanups. * rs/misc-cleanups: pack-bitmap-write: use hashwrite_be32() in write_hash_cache() midx: use hashwrite_u8() in write_midx_header() fast-import: use write_pack_header()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fast-import.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index 1c85eafe43..1bf50a73dc 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -739,7 +739,6 @@ static void start_packfile(void)
{
struct strbuf tmp_file = STRBUF_INIT;
struct packed_git *p;
- struct pack_header hdr;
int pack_fd;
pack_fd = odb_mkstemp(&tmp_file, "pack/tmp_pack_XXXXXX");
@@ -750,13 +749,8 @@ static void start_packfile(void)
p->do_not_close = 1;
pack_file = hashfd(pack_fd, p->pack_name);
- hdr.hdr_signature = htonl(PACK_SIGNATURE);
- hdr.hdr_version = htonl(2);
- hdr.hdr_entries = 0;
- hashwrite(pack_file, &hdr, sizeof(hdr));
-
pack_data = p;
- pack_size = sizeof(hdr);
+ pack_size = write_pack_header(pack_file, 0);
object_count = 0;
REALLOC_ARRAY(all_packs, pack_id + 1);