branch: add a --copy (-c) option to go with --move (-m)
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index f0685c92513e306188d89380a1c3020024a4edb4..d724cda58f890a34ec09c7cb43743ff1dc7af063 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -2032,3 +2032,14 @@ int rename_ref(const char *oldref, const char *newref, const char *logmsg)
 {
        return refs_rename_ref(get_main_ref_store(), oldref, newref, logmsg);
 }
+
+int refs_copy_existing_ref(struct ref_store *refs, const char *oldref,
+                   const char *newref, const char *logmsg)
+{
+       return refs->be->copy_ref(refs, oldref, newref, logmsg);
+}
+
+int copy_existing_ref(const char *oldref, const char *newref, const char *logmsg)
+{
+       return refs_copy_existing_ref(get_main_ref_store(), oldref, newref, logmsg);
+}