summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 16:17:43 +0200
committerJunio C Hamano <gitster@pobox.com>2017-05-23 14:29:55 +0900
commit8d4240d3c8a2d31b7bedda8408c0b3c217c76998 (patch)
treebc9227ce8e4e3c8e29426f6cbbe2f60f934cdd20 /refs
parentc0ca9357640ae5efbdbfed4c5b476c820a839e85 (diff)
downloadgit-8d4240d3c8a2d31b7bedda8408c0b3c217c76998.tar.gz
ref_transaction_commit(): check for valid `transaction->state`
Move the check that `transaction->state` is valid from `files_transaction_commit()` to `ref_transaction_commit()`, where other future reference backends can benefit from it as well. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 2c70de5209..a4261d4683 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2874,9 +2874,6 @@ static int files_transaction_commit(struct ref_store *ref_store,
assert(err);
- if (transaction->state != REF_TRANSACTION_OPEN)
- die("BUG: commit called for transaction that is not open");
-
if (!transaction->nr)
goto cleanup;