Re: [PATCH 5/8] string-list: add pos to iterator callback

2014-07-01 Thread Jeff King
On Tue, Jul 01, 2014 at 10:45:19AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > When we are running a string-list foreach or filter, the > > callback function sees only the string_list_item, along with > > a void* data pointer provided by the caller. This is > > sufficient for most pur

Re: [PATCH 5/8] string-list: add pos to iterator callback

2014-07-01 Thread Junio C Hamano
Jeff King writes: > When we are running a string-list foreach or filter, the > callback function sees only the string_list_item, along with > a void* data pointer provided by the caller. This is > sufficient for most purposes. > > However, it can also be useful to know the position of the > item

[PATCH 5/8] string-list: add pos to iterator callback

2014-06-25 Thread Jeff King
When we are running a string-list foreach or filter, the callback function sees only the string_list_item, along with a void* data pointer provided by the caller. This is sufficient for most purposes. However, it can also be useful to know the position of the item within the string (for example, i