Subject: Re: [PATCH v5 16/26] refs.c: move ref iterators to the common code

From: Michael Haggerty <[email-masked]>
Date: Sun, 01 Nov 2015 05:39:32 +0100

On 10/28/2015 03:14 AM, David Turner wrote:
> From: Ronnie Sahlberg <[email-masked]>
> 
> Signed-off-by: Ronnie Sahlberg <[email-masked]>
> Signed-off-by: Junio C Hamano <[email-masked]>
> Signed-off-by: David Turner <[email-masked]>
> ---
>  refs-be-files.c | 82 ---------------------------------------------------------
>  refs.c          | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 81 insertions(+), 82 deletions(-)
> 
> diff --git a/refs-be-files.c b/refs-be-files.c
> index c5cc7e7..d04a9d2 100644
> --- a/refs-be-files.c
> +++ b/refs-be-files.c
> [...]
> @@ -1950,37 +1933,6 @@ int for_each_ref_in_submodule(const char *submodule, const char *prefix,
>  {
>  	return do_for_each_ref(get_ref_cache(submodule), prefix, fn, strlen(prefix), 0, cb_data);
>  }
> -
> -int for_each_tag_ref(each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in("refs/tags/", fn, cb_data);
> -}
> -
> -int for_each_tag_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in_submodule(submodule, "refs/tags/", fn, cb_data);
> -}
> -
> -int for_each_branch_ref(each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in("refs/heads/", fn, cb_data);
> -}
> -
> -int for_each_branch_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in_submodule(submodule, "refs/heads/", fn, cb_data);
> -}
> -
> -int for_each_remote_ref(each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in("refs/remotes/", fn, cb_data);
> -}
> -
> -int for_each_remote_ref_submodule(const char *submodule, each_ref_fn fn, void *cb_data)
> -{
> -	return for_each_ref_in_submodule(submodule, "refs/remotes/", fn, cb_data);
> -}
> -
>  int for_each_replace_ref(each_ref_fn fn, void *cb_data)
>  {
>  	return do_for_each_ref(&ref_cache, git_replace_ref_base, fn,

Nit: you deleted one LF too many in the above hunk, leaving no blank
line between the function definitions.

> [...]

Michael

-- 
Michael Haggerty
[email-masked]