Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-10 Thread Jeff King
On Fri, Jan 10, 2014 at 09:59:25AM +0100, Michael Haggerty wrote: > > However, is it safe to prime only part of the loose ref namespace? > [...] > > prime_ref_dir() is called by do_for_each_entry(), which all the > iteration functions pass through. It is always called before the > iteration star

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-10 Thread Michael Haggerty
On 01/09/2014 10:49 PM, Jeff King wrote: > On Wed, Jan 08, 2014 at 12:29:51PM +0100, Michael Haggerty wrote: > >>> Here's a fixed version of patch 3/5. >> >> v2 4/5 doesn't apply cleanly on top of v3 3/5. So I'm basing my review >> on the branch you have at GitHub peff/git "jk/cat-file-warn-ambig

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-09 Thread Jeff King
On Thu, Jan 09, 2014 at 09:51:24AM -0800, Junio C Hamano wrote: > > On Tue, Jan 07, 2014 at 06:58:50PM -0500, Jeff King wrote: > > > >> + if (flags & DO_FOR_EACH_NO_RECURSE) { > >> + struct ref_dir *subdir = get_ref_dir(entry); > >> +

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-09 Thread Jeff King
On Wed, Jan 08, 2014 at 12:29:51PM +0100, Michael Haggerty wrote: > > Here's a fixed version of patch 3/5. > > v2 4/5 doesn't apply cleanly on top of v3 3/5. So I'm basing my review > on the branch you have at GitHub peff/git "jk/cat-file-warn-ambiguous"; > I hope it is the same. Hrmph. I didn'

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-09 Thread Junio C Hamano
Jeff King writes: > On Tue, Jan 07, 2014 at 06:58:50PM -0500, Jeff King wrote: > >> +if (flags & DO_FOR_EACH_NO_RECURSE) { >> +struct ref_dir *subdir = get_ref_dir(entry); >> +sort_ref_dir(subdir); >> +

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-08 Thread Michael Haggerty
On 01/08/2014 04:47 AM, Jeff King wrote: > On Tue, Jan 07, 2014 at 06:58:50PM -0500, Jeff King wrote: > >> +if (flags & DO_FOR_EACH_NO_RECURSE) { >> +struct ref_dir *subdir = get_ref_dir(entry); >> +sort_ref_dir(subdir); >

Re: [PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-08 Thread Jeff King
On Tue, Jan 07, 2014 at 10:47:33PM -0500, Jeff King wrote: > On Tue, Jan 07, 2014 at 06:58:50PM -0500, Jeff King wrote: > > > + if (flags & DO_FOR_EACH_NO_RECURSE) { > > + struct ref_dir *subdir = get_ref_dir(entry); > > + sort

[PATCH v3 3/5] refs: teach for_each_ref a flag to avoid recursion

2014-01-07 Thread Jeff King
On Tue, Jan 07, 2014 at 06:58:50PM -0500, Jeff King wrote: > + if (flags & DO_FOR_EACH_NO_RECURSE) { > + struct ref_dir *subdir = get_ref_dir(entry); > + sort_ref_dir(subdir); > + retval = do_fo