return refs->be->initial_transaction_commit(refs, transaction, err);
}
+
+int delete_refs(struct string_list *refnames, unsigned int flags)
+{
+ struct ref_store *refs = get_ref_store(NULL);
+
+ return refs->be->delete_refs(refs, refnames, flags);
+}
return 0;
}
-int delete_refs(struct string_list *refnames, unsigned int flags)
+static int files_delete_refs(struct ref_store *ref_store,
+ struct string_list *refnames, unsigned int flags)
{
struct files_ref_store *refs =
- get_files_ref_store(NULL, "delete_refs");
+ files_downcast(ref_store, 0, "delete_refs");
struct strbuf err = STRBUF_INIT;
int i, result = 0;
files_pack_refs,
files_peel_ref,
files_create_symref,
+ files_delete_refs,
files_ref_iterator_begin,
files_read_raw_ref,
const char *ref_target,
const char *refs_heads_master,
const char *logmsg);
+typedef int delete_refs_fn(struct ref_store *ref_store,
+ struct string_list *refnames, unsigned int flags);
/*
* Iterate over the references in the specified ref_store that are
pack_refs_fn *pack_refs;
peel_ref_fn *peel_ref;
create_symref_fn *create_symref;
+ delete_refs_fn *delete_refs;
ref_iterator_begin_fn *iterator_begin;
read_raw_ref_fn *read_raw_ref;