Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:52 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-26 02:24:52 +0300
commit455e8d18f81583d0270685edc6ec2ed201fc984c (patch)
treecc8a2951eb2473f5970c505d03b1ef5349067d1a /midx.c
parent2557c1183a6c6025bc0dd6ebd84354064bb398ec (diff)
parent970909c2a7803564f82ab1d3660d77ad6a44b68f (diff)
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 'midx.c')
-rw-r--r--midx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/midx.c b/midx.c
index d233b54ac7..da03c1449a 100644
--- a/midx.c
+++ b/midx.c
@@ -785,9 +785,7 @@ static size_t write_midx_large_offsets(struct hashfile *f, uint32_t nr_large_off
if (!(offset >> 31))
continue;
- hashwrite_be32(f, offset >> 32);
- hashwrite_be32(f, offset & 0xffffffffUL);
- written += 2 * sizeof(uint32_t);
+ written += hashwrite_be64(f, offset);
nr_large_offset--;
}
@@ -975,8 +973,7 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
chunk_offsets[i]);
hashwrite_be32(f, chunk_ids[i]);
- hashwrite_be32(f, chunk_offsets[i] >> 32);
- hashwrite_be32(f, chunk_offsets[i]);
+ hashwrite_be64(f, chunk_offsets[i]);
written += MIDX_CHUNKLOOKUP_WIDTH;
}