diff options
author | David Turner <dturner@twopensource.com> | 2016-09-04 18:08:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-09 15:28:14 -0700 |
commit | a27dcf89b6867577bb714e181dd181cd1a1e6512 (patch) | |
tree | a99616e09117889b4b025f3ac0b1e71785bab47f /refs.c | |
parent | fc6814637d2e756029b45cb5fd952359bfec6f88 (diff) | |
download | git-a27dcf89b6867577bb714e181dd181cd1a1e6512.tar.gz |
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 <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); +} |