Subject: Re: [PATCH v4 09/21] refs: add method to rename refs

From: Michael Haggerty <[email-masked]>
Date: Thu, 11 Feb 2016 10:00:04 +0100

On 02/05/2016 08:44 PM, David Turner wrote:
> Signed-off-by: David Turner <[email-masked]>
> ---
>  refs.c               | 5 +++++
>  refs/files-backend.c | 4 +++-
>  refs/refs-internal.h | 9 +++++++++
>  3 files changed, 17 insertions(+), 1 deletion(-)
> 
> [...]
> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
> index 5768fee..15fa99c 100644
> --- a/refs/refs-internal.h
> +++ b/refs/refs-internal.h
> @@ -67,6 +67,13 @@ int do_for_each_per_worktree_ref(const char *submodule, const char *base,
>  				 each_ref_fn fn, int trim, int flags,
>  				 void *cb_data);
>  
> +/*
> + * Check if the new name does not conflict with any existing refs
> + * (other than possibly the old ref).  Return 0 if the ref can be
> + * renamed to the new name.
> + */
> +int rename_ref_available(const char *oldname, const char *newname);

Thanks for adding a docstring for this function. But this function
already has a declaration later in the file so you should remove one or
the other.

> [...]

Michael

-- 
Michael Haggerty
[email-masked]