]> git.ipfire.org Git - thirdparty/git.git/commit
read-cache: read data in a hash-independent way
authorbrian m. carlson <sandals@crustytoothpaste.net>
Tue, 19 Feb 2019 00:05:24 +0000 (00:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Apr 2019 02:57:39 +0000 (11:57 +0900)
commit575fa8a3ed5828f01a934fc3337f05a43ccf7679
tree446cbb171d4c30338b57d7f746b76cb868fb1efa
parent3899b88b49c03ae76f8834a277cbd45bc6bde830
read-cache: read data in a hash-independent way

Index entries are structured with a variety of fields up front, followed
by a hash and one or two flags fields.  Because the hash field is stored
in the middle of the structure, it's difficult to use one fixed-size
structure that easily allows access to the hash and flags fields.
Adjust the structure to hold the maximum amount of data that may be
needed using a member called "data" and read and write this field
independently in the various places that need to read and write the
structure.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c