From: Michael Haggerty Date: Thu, 24 Mar 2016 07:07:56 GMT Subject: Re: [PATCH v7 09/33] refs: reduce the visibility of do_for_each_ref() Message-ID: <56F3924C.3040408@alum.mit.edu> In-Reply-To: <1456793586-22082-10-git-send-email-dturner@twopensource.com> On 03/01/2016 01:52 AM, David Turner wrote: > From: Ramsay Jones > > Now that we have moved do_for_each_ref into refs.c, it no longer needs > to be public. > > Signed-off-by: Ramsay Jones > Signed-off-by: Junio C Hamano > --- > refs.c | 19 +++++++++++-------- > refs/refs-internal.h | 6 ------ > 2 files changed, 11 insertions(+), 14 deletions(-) > > diff --git a/refs.c b/refs.c > index dc5682a..cea5997 100644 > --- a/refs.c > +++ b/refs.c > @@ -1142,6 +1142,17 @@ int head_ref(each_ref_fn fn, void *cb_data) > return head_ref_submodule(NULL, fn, cb_data); > } > > +/* > + * The common backend for the for_each_*ref* functions > + */ > +static int do_for_each_ref(const char *submodule, const char *base, > + each_ref_fn fn, int trim, int flags, > + void *cb_data) The two lines above are indented incorrectly. > +{ > + return the_refs_backend->do_for_each_ref(submodule, base, fn, trim, > + flags, cb_data); > +} > + > int for_each_ref(each_ref_fn fn, void *cb_data) > { > return do_for_each_ref(NULL, "", fn, 0, 0, cb_data); > @@ -1342,11 +1353,3 @@ int resolve_gitlink_ref(const char *path, const char *refname, > { > return the_refs_backend->resolve_gitlink_ref(path, refname, sha1); > } > - > -int do_for_each_ref(const char *submodule, const char *base, > - each_ref_fn fn, int trim, int flags, > - void *cb_data) > -{ > - return the_refs_backend->do_for_each_ref(submodule, base, fn, trim, > - flags, cb_data); > -} Nit: in the previous patch, please put the function where you want it so that you don't have to move it in this patch. > [...] Michael