summaryrefslogtreecommitdiff
path: root/pack-write.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-25 23:24:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-25 23:24:52 (GMT)
commit455e8d18f81583d0270685edc6ec2ed201fc984c (patch)
treecc8a2951eb2473f5970c505d03b1ef5349067d1a /pack-write.c
parent2557c1183a6c6025bc0dd6ebd84354064bb398ec (diff)
parent970909c2a7803564f82ab1d3660d77ad6a44b68f (diff)
downloadgit-455e8d18f81583d0270685edc6ec2ed201fc984c.zip
git-455e8d18f81583d0270685edc6ec2ed201fc984c.tar.gz
git-455e8d18f81583d0270685edc6ec2ed201fc984c.tar.bz2
Merge branch 'rs/hashwrite-be64'
Code simplification. * rs/hashwrite-be64: pack-write: use hashwrite_be64() midx: use hashwrite_be64() csum-file: add hashwrite_be64()
Diffstat (limited to 'pack-write.c')
-rw-r--r--pack-write.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pack-write.c b/pack-write.c
index 23e19cc..3513665 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -151,13 +151,10 @@ const char *write_idx_file(const char *index_name, struct pack_idx_entry **objec
while (nr_large_offset) {
struct pack_idx_entry *obj = *list++;
uint64_t offset = obj->offset;
- uint32_t split[2];
if (!need_large_offset(offset, opts))
continue;
- split[0] = htonl(offset >> 32);
- split[1] = htonl(offset & 0xffffffff);
- hashwrite(f, split, 8);
+ hashwrite_be64(f, offset);
nr_large_offset--;
}
}