From 127b42a18618538438b811a29cd95e79c646eb70 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 4 Sep 2016 18:08:16 +0200 Subject: refs: add a transaction_commit() method Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano Signed-off-by: Jeff King Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs/files-backend.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'refs/files-backend.c') diff --git a/refs/files-backend.c b/refs/files-backend.c index 17404413cc..2d847f57e4 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -3700,11 +3700,12 @@ static int lock_ref_for_update(struct ref_update *update, return 0; } -int ref_transaction_commit(struct ref_transaction *transaction, - struct strbuf *err) +static int files_transaction_commit(struct ref_store *ref_store, + struct ref_transaction *transaction, + struct strbuf *err) { struct files_ref_store *refs = - get_files_ref_store(NULL, "ref_transaction_commit"); + files_downcast(ref_store, 0, "ref_transaction_commit"); int ret = 0, i; struct string_list refs_to_delete = STRING_LIST_INIT_NODUP; struct string_list_item *ref_to_delete; @@ -4093,5 +4094,6 @@ int reflog_expire(const char *refname, const unsigned char *sha1, struct ref_storage_be refs_be_files = { NULL, "files", - files_ref_store_create + files_ref_store_create, + files_transaction_commit }; -- cgit v1.2.1