diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-03 15:53:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-03 16:24:45 -0700 |
commit | d60c49c2d7f683cd24a738533846cd3e34f2073e (patch) | |
tree | 21edaed27035f0878e78e5ed107b7c7f81dc3fa8 /branch.h | |
parent | db3b313c84522d89ac358187a7f6928dfcfb1e7d (diff) | |
download | git-d60c49c2d7f683cd24a738533846cd3e34f2073e.tar.gz |
read-cache.c: allow unaligned mapping of the index file
Both the on-disk format v2 and v3 pads the "name" field to the multiple of
eight to make sure that various quantities in network long/short type can
be accessed with ntohl/ntohs without having to worry about alignment, but
this forces us to waste disk I/O bandwidth.
Introduce ntoh_s()/ntoh_l() macros that the callers can use as if they were
the regular ntohs()/ntohl() on a field that may not be aligned correctly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.h')
0 files changed, 0 insertions, 0 deletions