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
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-11-03 19:20:19 +0300
committerJunio C Hamano <gitster@pobox.com>2023-11-04 09:54:25 +0300
commit4815c3c4b26a91301c51360297ebfdef3b96a4ce (patch)
tree4dbca860958d9f3a96cff3b79c22e1f3063af664 /commit-graph.c
parent7538f9d89b001be33a1b682b5cf207c4ba8fd8c5 (diff)
t: avoid perl's pack/unpack "Q" specifier
The perl script introduced by 86b008ee61 (t: add library for munging chunk-format files, 2023-10-09) uses pack("Q") and unpack("Q") to read and write 64-bit values ("quadwords" in perl parlance) from the on-disk chunk files. However, some builds of perl may not support 64-bit integers at all, and throw an exception here. While some 32-bit platforms may still support 64-bit integers in perl (such as our linux32 CI environment), others reportedly don't (the NonStop 32-bit builds). We can work around this by treating the 64-bit values as two 32-bit values. We can't ever combine them into a single 64-bit value, but in practice this is OK. These are representing file offsets, and our files are much smaller than 4GB. So the upper half of the 64-bit value will always be 0. We can just introduce a few helper functions which perform the translation and double-check our assumptions. Reported-by: Randall S. Becker <randall.becker@nexbridge.ca> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions