]> git.ipfire.org Git - thirdparty/git.git/commit - read-cache.c
read-cache.c: read prefix-compressed names in index on-disk version v4
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Apr 2012 22:53:15 +0000 (15:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Apr 2012 23:24:46 +0000 (16:24 -0700)
commit6c9cd161d9d1bee349b1389d661282c92da098bc
tree3f246a8cb55a0767a7ce4a25c083918b24233560
parentf136f7bfe816b46ebabf5439f8e55f37097ca353
read-cache.c: read prefix-compressed names in index on-disk version v4

Because the entries are sorted by path, adjacent entries in the index tend
to share the leading components of them, and it makes sense to only store
the differences in later entries.  In the v4 on-disk format of the index,
each on-disk cache entry stores the number of bytes to be stripped from
the end of the previous name, and the bytes to append to the result, to
come up with its name.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c