Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-25 Thread thomas
Junio C Hamano gits...@pobox.com writes: Thomas Rast tr...@student.ethz.ch writes: So here's a nonrecursive version. Dijkstra is probably turning over in his grave as we speak. I *think* I actually got it right. You seem to have lost the if we cannot get delta base, this object is BAD

Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-25 Thread Junio C Hamano
thomas tr...@student.ethz.ch writes: Junio C Hamano gits...@pobox.com writes: The following comment is also lost but... - /* We choose to only get the type of the base object and -* ignore potentially corrupt pack file that expects the delta -* based on a base with a wrong size.

Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-20 Thread Junio C Hamano
Thomas Rast tr...@student.ethz.ch writes: So here's a nonrecursive version. Dijkstra is probably turning over in his grave as we speak. I *think* I actually got it right. You seem to have lost the if we cannot get delta base, this object is BAD check where you measure the size of a

[PATCH] sha1_file: remove recursion in packed_object_info

2013-03-19 Thread Thomas Rast
packed_object_info() and packed_delta_info() were mutually recursive. The former would handle ordinary types and defer deltas to the latter; the latter would use the former to resolve the delta base. This arrangement, however, leads to trouble with threaded index-pack and long delta chains on