summaryrefslogtreecommitdiff
path: root/git-gui/lib/tools.tcl
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2014-01-23 16:26:42 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-23 14:03:48 -0800
commitc3d8da571f11b0146e60591c040da399d411c3f2 (patch)
treee04be828b55e2a9d7d5d6832c3735a218a6ac82d /git-gui/lib/tools.tcl
parentblock-sha1: factor out get_be and put_be wrappers (diff)
downloadtgif-c3d8da571f11b0146e60591c040da399d411c3f2.tar.xz
read-cache: use get_be32 instead of hand-rolled ntoh_l
Commit d60c49c (read-cache.c: allow unaligned mapping of the index file, 2012-04-03) introduced helpers to access unaligned data. However, we already have get_be32, which has a few advantages: 1. It's already written, so we avoid duplication. 2. It's probably faster, since it does the endian conversion and the alignment fix at the same time. 3. The get_be32 code is well-tested, having been in block-sha1 for a long time. By contrast, our custom helpers were probably almost never used, since the user needed to manually define a macro to enable them. We have to add a get_be16 implementation to the existing get_be32, but that is very simple to do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/tools.tcl')
0 files changed, 0 insertions, 0 deletions