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>
This commit is contained in:
Michael Haggerty
2017-05-22 16:17:45 +02:00
committed by Junio C Hamano
parent 30173b8851
commit 2ced105cb1
3 changed files with 25 additions and 17 deletions

View File

@ -169,6 +169,14 @@ int refs_read_raw_ref(struct ref_store *ref_store,
const char *refname, unsigned char *sha1,
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