Re: [PATCH v4 09/21] refs: add method to rename refs
flat view
From: David Turner <hidden>
Date: 2016-06-15 23:08:11
On Thu, 2016-02-11 at 10:00 +0100, Michael Haggerty wrote:
On 02/05/2016 08:44 PM, David Turner wrote:quoted
Signed-off-by: David Turner <redacted> --- 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.
Fixed, thanks.