summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-04-16 16:31:31 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-17 00:43:31 (GMT)
commita3fbf4dfe1bf2386add261dc7c2809b652b5f9ae (patch)
tree72878c2be5f659d9f711cd088cb9259a0b9991b4 /sha1_file.c
parent81a216a5d6a12976b20d9a39829562f280ae96f2 (diff)
downloadgit-a3fbf4dfe1bf2386add261dc7c2809b652b5f9ae.zip
git-a3fbf4dfe1bf2386add261dc7c2809b652b5f9ae.tar.gz
git-a3fbf4dfe1bf2386add261dc7c2809b652b5f9ae.tar.bz2
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 <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
0 files changed, 0 insertions, 0 deletions