summaryrefslogtreecommitdiff
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 16:17:45 +0200
committerJunio C Hamano <gitster@pobox.com>2017-05-23 14:29:55 +0900
commit2ced105cb1df064b9400aef5f4d35e20026ab267 (patch)
treef9a32c742c83422971c9694d71d67e5d4fe0ba18 /refs/refs-internal.h
parent30173b8851bb7203de938a638386cb9e6d7c501b (diff)
downloadgit-2ced105cb1df064b9400aef5f4d35e20026ab267.tar.gz
ref_update_reject_duplicates(): expose function to whole refs module
It will soon have some other users. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r--refs/refs-internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 4d3dd17f9f..192f9f85c9 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -170,6 +170,14 @@ int refs_read_raw_ref(struct ref_store *ref_store,
struct strbuf *referent, unsigned int *type);
/*
+ * Write an error to `err` and return a nonzero value iff the same
+ * refname appears multiple times in `refnames`. `refnames` must be
+ * sorted on entry to this function.
+ */
+int ref_update_reject_duplicates(struct string_list *refnames,
+ struct strbuf *err);
+
+/*
* Add a ref_update with the specified properties to transaction, and
* return a pointer to the new object. This function does not verify
* that refname is well-formed. new_sha1 and old_sha1 are only