Re: [PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-07 Thread Jeff King
On Tue, Jul 07, 2015 at 08:49:19AM -0700, Junio C Hamano wrote: > Duy Nguyen writes: > > > I keep tripping over this "real_type vs type" in this code. What do > > you think about renaming "type" field to "in_pack_type" and > > "real_type" to "canon_type" (or "final_type")? "Real" does not really

Re: [PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-07 Thread Junio C Hamano
Duy Nguyen writes: > I keep tripping over this "real_type vs type" in this code. What do > you think about renaming "type" field to "in_pack_type" and > "real_type" to "canon_type" (or "final_type")? "Real" does not really > say anything in this context.. An unqualified name "type" does bother m

Re: [PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-06 Thread Duy Nguyen
On Sun, Jul 5, 2015 at 5:30 AM, Junio C Hamano wrote: > When c6458e60 (index-pack: kill union delta_base to save memory, > 2015-04-18) attempted to reduce the memory footprint of index-pack, > one of the key thing it did was to keep track of ref-deltas and > ofs-deltas separately. > > In fix_unres

Re: [PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-06 Thread Junio C Hamano
Junio C Hamano writes: > When c6458e60 (index-pack: kill union delta_base to save memory, > 2015-04-18) attempted to reduce the memory footprint of index-pack, > one of the key thing it did was to keep track of ref-deltas and > ofs-deltas separately. > > In fix_unresolved_deltas(), however it for

[PATCH] index-pack: fix allocation of sorted_by_pos array

2015-07-05 Thread Junio C Hamano
When c6458e60 (index-pack: kill union delta_base to save memory, 2015-04-18) attempted to reduce the memory footprint of index-pack, one of the key thing it did was to keep track of ref-deltas and ofs-deltas separately. In fix_unresolved_deltas(), however it forgot that it now wants to look only a