Re: [PATCH v2 17/29] packed_ref_store: support iteration

2017-06-23 Thread Jeff King
On Fri, Jun 23, 2017 at 09:01:35AM +0200, Michael Haggerty wrote: > +static int packed_ref_iterator_advance(struct ref_iterator *ref_iterator) > +{ > + struct packed_ref_iterator *iter = > + (struct packed_ref_iterator *)ref_iterator; I thought had some kind of safe downcasting me

[PATCH v2 17/29] packed_ref_store: support iteration

2017-06-23 Thread Michael Haggerty
Add the infrastructure to iterate over a `packed_ref_store`. It's a lot of boilerplate, but it's all part of a campaign to make `packed_ref_store` implement `ref_store`. In the future, this iterator will work much differently. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 119 ++