From a27dcf89b6867577bb714e181dd181cd1a1e6512 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sun, 4 Sep 2016 18:08:40 +0200 Subject: refs: make delete_refs() virtual In the file-based backend, delete_refs has some special optimization to deal with packed refs. In other backends, we might be able to make ref deletion faster by putting all deletions into a single transaction. So we need a special backend function for this. Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'refs.c') diff --git a/refs.c b/refs.c index 693d10fba7..f26601dc0c 100644 --- a/refs.c +++ b/refs.c @@ -1532,3 +1532,10 @@ int initial_ref_transaction_commit(struct ref_transaction *transaction, 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); +} -- cgit v1.3