path: root/sha1_file.c
diff options
authorNicolas Pitre <>2007-04-16 16:31:31 (GMT)
committerJunio C Hamano <>2007-04-17 00:43:31 (GMT)
commita3fbf4dfe1bf2386add261dc7c2809b652b5f9ae (patch)
tree72878c2be5f659d9f711cd088cb9259a0b9991b4 /sha1_file.c
parent81a216a5d6a12976b20d9a39829562f280ae96f2 (diff)
pack-objects: make in_pack_header_size a variable of its own
It currently aliases delta_size on the principle that reused deltas won't go through the whole delta matching loop hence delta_size was unused. This is not true if given delta doesn't find its base in the pack though. But we need that information even for whole object data reuse. Well in short the current state looks awful and is prone to bugs. It just works fine now because try_delta() tests trg_entry->delta before using trg_entry->delta_size, but that is a bit subtle and I was wondering for a while why things just worked fine... even if I'm guilty of having introduced this abomination myself in the first place. Let's do the sensible thing instead with no ambiguity, which is to have a separate variable for in_pack_header_size. This might even help future optimizations. While at it, let's reorder some struct object_entry members so they all align well with their own width, regardless of the architecture or the size of off_t. Some memory saving is to be expected with this alone. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'sha1_file.c')
0 files changed, 0 insertions, 0 deletions