From: Michael Haggerty Date: Thu, 11 Feb 2016 09:00:04 GMT Subject: Re: [PATCH v4 09/21] refs: add method to rename refs Message-ID: <56BC4D94.4040003@alum.mit.edu> In-Reply-To: <1454701462-3817-10-git-send-email-dturner@twopensource.com> On 02/05/2016 08:44 PM, David Turner wrote: > Signed-off-by: David Turner > --- > 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 mhagger@alum.mit.edu