summaryrefslogtreecommitdiff
path: root/git.spec.in
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-10-20 20:46:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-20 22:16:23 (GMT)
commitce3f6dc655392803a59c9b2f2ec9509fd8061b33 (patch)
tree8e8bf1cb006a666da52991b2db3e0f3e49c9a5a0 /git.spec.in
parent6a87ed972c9c7a4b4378b6e34670d3aa2ac7ccc8 (diff)
downloadgit-ce3f6dc655392803a59c9b2f2ec9509fd8061b33.zip
git-ce3f6dc655392803a59c9b2f2ec9509fd8061b33.tar.gz
git-ce3f6dc655392803a59c9b2f2ec9509fd8061b33.tar.bz2
fix multiple issues in index-pack
Since commit 9441b61dc5, two issues affected correct behavior of index-pack: 1) The real_type of a delta object is the 'real_type' of its base, not the 'type' which can be a "delta type". Consequence of this is a corrupted pack index file which only needs to be recreated with a good index-pack command ('git verify-pack' will flag those). 2) The code sequence: result->data = patch_delta(get_base_data(base), base->obj->size, delta_data, delta_size, &result->size); has two issues of its own since base->obj->size should instead be base->size as we want the size of the actual object data and not the size of the delta object it is represented by. Except that simply replacing base->obj->size with base->size won't make the code more correct as the C language doesn't enforce a particular ordering for the evaluation of needed arguments for a function call, hence base->size could be pushed on the stack before get_base_data() which initializes base->size is called. Signed-off-by: Nicolas Pitre <nico@cam.org> Tested-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.spec.in')
0 files changed, 0 insertions, 0 deletions