Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-25 Thread Junio C Hamano
thomas writes: > Junio C Hamano 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. This saves tons of >>>

Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-25 Thread thomas
Junio C Hamano writes: > Thomas Rast 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 t

Re: [PATCH] sha1_file: remove recursion in packed_object_info

2013-03-20 Thread Junio C Hamano
Thomas Rast 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 deltified object, which

[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 plat