refs_verify_refname_available(): implement once for all backends
It turns out that we can now implement `refs_verify_refname_available()` based on the other virtual functions, so there is no need for it to be defined at the backend level. Instead, define it once in `refs.c` and remove the `files_backend` definition. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e121b9cb5f
commit
b05855b5bc
@ -590,12 +590,6 @@ typedef int read_raw_ref_fn(struct ref_store *ref_store,
|
||||
const char *refname, unsigned char *sha1,
|
||||
struct strbuf *referent, unsigned int *type);
|
||||
|
||||
typedef int verify_refname_available_fn(struct ref_store *ref_store,
|
||||
const char *newname,
|
||||
const struct string_list *extras,
|
||||
const struct string_list *skip,
|
||||
struct strbuf *err);
|
||||
|
||||
struct ref_storage_be {
|
||||
struct ref_storage_be *next;
|
||||
const char *name;
|
||||
@ -612,7 +606,6 @@ struct ref_storage_be {
|
||||
|
||||
ref_iterator_begin_fn *iterator_begin;
|
||||
read_raw_ref_fn *read_raw_ref;
|
||||
verify_refname_available_fn *verify_refname_available;
|
||||
|
||||
reflog_iterator_begin_fn *reflog_iterator_begin;
|
||||
for_each_reflog_ent_fn *for_each_reflog_ent;
|
||||
|
||||
Reference in New Issue
Block a user