Merge branch 'rs/hashwrite-be64'

Code simplification.

* rs/hashwrite-be64:
  pack-write: use hashwrite_be64()
  midx: use hashwrite_be64()
  csum-file: add hashwrite_be64()
This commit is contained in:
Junio C Hamano
2020-11-25 15:24:52 -08:00
3 changed files with 10 additions and 9 deletions

7
midx.c
View File

@ -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;
}