Thread (52 messages) 52 messages, 3 authors, 2016-06-15

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

flat view

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:08:11

On 02/05/2016 08:44 PM, David Turner wrote:
quoted hunk ↗ jump to hunk
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.
[...]
Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help