Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Antoine Pelisse writes: > On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: >> +static int verify_hdr(void *mmap, unsigned long size) >> +{ >> + uint32_t *filecrc; >> + unsigned int header_size; >> + struct cache_header *hdr; >> + struct cache_header_v5 *hdr_v5; >>

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Antoine Pelisse writes: > On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: >> Make git read the index file version 5 without complaining. >> >> This version of the reader reads neither the cache-tree >> nor the resolve undo data, however, it won't choke on an >> index that includes such d

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Antoine Pelisse
On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: > +static int verify_hdr(void *mmap, unsigned long size) > +{ > + uint32_t *filecrc; > + unsigned int header_size; > + struct cache_header *hdr; > + struct cache_header_v5 *hdr_v5; > + > + if (size < sizeof(struc

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Antoine Pelisse
On Wed, Nov 27, 2013 at 1:00 PM, Thomas Gummerer wrote: > Make git read the index file version 5 without complaining. > > This version of the reader reads neither the cache-tree > nor the resolve undo data, however, it won't choke on an > index that includes such data. > > Helped-by: Junio C Haman

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Thomas Gummerer
Duy Nguyen writes: > On Wed, Nov 27, 2013 at 7:00 PM, Thomas Gummerer wrote: >> --- a/cache.h >> +++ b/cache.h >> @@ -132,11 +141,17 @@ struct cache_entry { >> char name[FLEX_ARRAY]; /* more */ >> }; >> >> +#define CE_NAMEMASK (0x0fff) > > CE_NAMEMASK is redefined in read-cache-v2.c in

Re: [PATCH v4 12/24] read-cache: read index-v5

2013-11-30 Thread Duy Nguyen
On Wed, Nov 27, 2013 at 7:00 PM, Thomas Gummerer wrote: > --- a/cache.h > +++ b/cache.h > @@ -132,11 +141,17 @@ struct cache_entry { > char name[FLEX_ARRAY]; /* more */ > }; > > +#define CE_NAMEMASK (0x0fff) CE_NAMEMASK is redefined in read-cache-v2.c in "read-cache: move index v2 speci

[PATCH v4 12/24] read-cache: read index-v5

2013-11-27 Thread Thomas Gummerer
Make git read the index file version 5 without complaining. This version of the reader reads neither the cache-tree nor the resolve undo data, however, it won't choke on an index that includes such data. Helped-by: Junio C Hamano Helped-by: Nguyen Thai Ngoc Duy Helped-by: Thomas Rast Signed-of