From: Michael Haggerty Date: Fri, 03 Jun 2016 21:03:37 GMT Subject: [PATCH 02/38] rename_ref_available(): add docstring Message-ID: <5eb96cc20c0f76aff39d1556803ebd4f9f422cea.1464983301.git.mhagger@alum.mit.edu> In-Reply-To: From: David Turner Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty --- refs/refs-internal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/refs/refs-internal.h b/refs/refs-internal.h index efe5847..d8a2606 100644 --- a/refs/refs-internal.h +++ b/refs/refs-internal.h @@ -240,6 +240,11 @@ const char *find_descendant_ref(const char *dirname, const struct string_list *extras, const struct string_list *skip); +/* + * 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); /* We allow "recursive" symbolic refs. Only within reason, though */ -- 2.8.1