cache.h: add repository argument to oid_object_info
[gitweb.git] / refs / files-backend.c
index f75d960e1982a2db5dc8828c6f1b10ffe64fda48..5c76a7581781440c27ddc1f5ffa96eeca2e4c1a4 100644 (file)
@@ -61,10 +61,6 @@ struct ref_lock {
        struct object_id old_oid;
 };
 
-/*
- * Future: need to be in "struct repository"
- * when doing a full libification.
- */
 struct files_ref_store {
        struct ref_store base;
        unsigned int store_flags;
@@ -2931,13 +2927,12 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
 
        if (initial_ref_transaction_commit(packed_transaction, err)) {
                ret = TRANSACTION_GENERIC_ERROR;
-               goto cleanup;
        }
 
+       packed_refs_unlock(refs->packed_ref_store);
 cleanup:
        if (packed_transaction)
                ref_transaction_free(packed_transaction);
-       packed_refs_unlock(refs->packed_ref_store);
        transaction->state = REF_TRANSACTION_CLOSED;
        string_list_clear(&affected_refnames, 0);
        return ret;