Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/05, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: +static struct directory_entry *read_directories_v5(unsigned int *dir_offset, + unsigned int *dir_table_offset, + void *mmap, +

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Junio C Hamano
Thomas Gummerer t.gumme...@gmail.com writes: + name = (char *)mmap + *dir_offset; + beginning = mmap + *dir_table_offset; Notice how you computed name with pointer arithmetic by first casting mmap (which is void *) and when computing beginning, you forgot to cast mmap and attempted

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-08 Thread Thomas Gummerer
On 08/08, Junio C Hamano wrote: Thomas Gummerer t.gumme...@gmail.com writes: +name = (char *)mmap + *dir_offset; +beginning = mmap + *dir_table_offset; Notice how you computed name with pointer arithmetic by first casting mmap (which is void *) and when computing

[PATCH/RFC v2 09/16] Read index-v5

2012-08-05 Thread Thomas Gummerer
Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke on an index that includes such data. Helped-by: Thomas Rast tr...@student.ethz.ch Signed-off-by: Thomas Gummerer