Re: [PATCH 18/20] commit_packed_refs(): use reference iteration

2017-03-22 Thread Jeff King
On Wed, Mar 22, 2017 at 09:42:58AM +0100, Michael Haggerty wrote: > > Should we be checking that peel_error is only PEELED or NON_TAG? > > This is a good question, and it took me a while to figure out the whole > answer. At first I deleted this check without much thought because it > was just an

Re: [PATCH 18/20] commit_packed_refs(): use reference iteration

2017-03-22 Thread Michael Haggerty
On 03/20/2017 07:05 PM, Jeff King wrote: > On Mon, Mar 20, 2017 at 05:33:23PM +0100, Michael Haggerty wrote: > >> -/* >> - * An each_ref_entry_fn that writes the entry to a packed-refs file. >> - */ >> -static int write_packed_entry_fn(struct ref_entry *entry, void *cb_data) >> -{ >> -enum pee

Re: [PATCH 18/20] commit_packed_refs(): use reference iteration

2017-03-20 Thread Jeff King
On Mon, Mar 20, 2017 at 05:33:23PM +0100, Michael Haggerty wrote: > -/* > - * An each_ref_entry_fn that writes the entry to a packed-refs file. > - */ > -static int write_packed_entry_fn(struct ref_entry *entry, void *cb_data) > -{ > - enum peel_status peel_status = peel_entry(entry, 0); > - >

[PATCH 18/20] commit_packed_refs(): use reference iteration

2017-03-20 Thread Michael Haggerty
Use reference iteration rather than do_for_each_entry_in_dir() in the definition of commit_packed_refs(). Signed-off-by: Michael Haggerty --- refs/files-backend.c | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/refs/files-backend.c b/r