Re: [PATCH 05/22] read-cache: add index reading api

2013-07-09 Thread Thomas Gummerer
Junio C Hamano writes: > Thomas Gummerer writes: > >>> The reader often needs to rewind the read-pointer partially while >>> walking the index (e.g. next_cache_entry() in unpack-trees.c and how >>> the o->cache_bottom position is used throughout the subsystem). I >>> am not sure if this singly-

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Junio C Hamano
Thomas Gummerer writes: >> The reader often needs to rewind the read-pointer partially while >> walking the index (e.g. next_cache_entry() in unpack-trees.c and how >> the o->cache_bottom position is used throughout the subsystem). I >> am not sure if this singly-linked list is a good way to go.

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Junio C Hamano writes: > Thomas Gummerer writes: > >> Add an api for access to the index file. Currently there is only a very >> basic api for accessing the index file, which only allows a full read of >> the index, and lets the users of the data filter it. The new index api >> gives the users

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Junio C Hamano
Thomas Gummerer writes: > Add an api for access to the index file. Currently there is only a very > basic api for accessing the index file, which only allows a full read of > the index, and lets the users of the data filter it. The new index api > gives the users the possibility to use only par

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen writes: > On Mon, Jul 8, 2013 at 6:20 PM, Thomas Gummerer wrote: >> Duy Nguyen writes: >>> Putting filter_opts in index_state feels like a bad design. Iterator >>> information should be separated from the iterated object, so that two >>> callers can walk through the same index withou

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Duy Nguyen
On Mon, Jul 8, 2013 at 6:20 PM, Thomas Gummerer wrote: > Duy Nguyen writes: >> Putting filter_opts in index_state feels like a bad design. Iterator >> information should be separated from the iterated object, so that two >> callers can walk through the same index without stepping on each other >>

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen writes: > On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer wrote: >> Add an api for access to the index file. Currently there is only a very >> basic api for accessing the index file, which only allows a full read of >> the index, and lets the users of the data filter it. The new ind

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-08 Thread Thomas Gummerer
Duy Nguyen writes: > On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer wrote: >> +/* >> + * Options by which the index should be filtered when read partially. >> + * >> + * pathspec: The pathspec which the index entries have to match >> + * seen: Used to return the seen parameter from match_pathsp

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Duy Nguyen
On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer wrote: > +/* > + * Options by which the index should be filtered when read partially. > + * > + * pathspec: The pathspec which the index entries have to match > + * seen: Used to return the seen parameter from match_pathspec() > + * max_prefix, max_p

Re: [PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Duy Nguyen
On Sun, Jul 7, 2013 at 3:11 PM, Thomas Gummerer wrote: > Add an api for access to the index file. Currently there is only a very > basic api for accessing the index file, which only allows a full read of > the index, and lets the users of the data filter it. The new index api > gives the users t

[PATCH 05/22] read-cache: add index reading api

2013-07-07 Thread Thomas Gummerer
Add an api for access to the index file. Currently there is only a very basic api for accessing the index file, which only allows a full read of the index, and lets the users of the data filter it. The new index api gives the users the possibility to use only part of the index and provides functi