author | Junio C Hamano <gitster@pobox.com> | |
Wed, 2 Feb 2011 18:06:51 +0000 (10:06 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 28 Feb 2011 07:29:03 +0000 (23:29 -0800) | ||
commit | 7218a215efc7ae46f7ca8d82442f354e7ac06262 | |
tree | e06c293bc3c3c7de9dc73e34eef742024a9dd3be | tree | snapshot |
parent | 8978166e531e0941811099d4117574ebbbcf35d8 | commit | diff |
index-pack: group the delta-base array entries also by type
Entries in the delta_base array are only grouped by the bytepattern in
the delta_base union, some of which have 20-byte object name of the base
object (i.e. base for REF_DELTA objects), while others have sizeof(off_t)
bytes followed by enough NULs to fill 20-byte. The loops to iterate
through a range inside this array still needs to inspect the type of the
delta, and skip over false hits.
Group the entries also by type to eliminate the potential of false hits.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Entries in the delta_base array are only grouped by the bytepattern in
the delta_base union, some of which have 20-byte object name of the base
object (i.e. base for REF_DELTA objects), while others have sizeof(off_t)
bytes followed by enough NULs to fill 20-byte. The loops to iterate
through a range inside this array still needs to inspect the type of the
delta, and skip over false hits.
Group the entries also by type to eliminate the potential of false hits.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c | diff | blob | history |