diff options
-rw-r--r-- | refs.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3809,16 +3809,20 @@ int ref_transaction_commit(struct ref_transaction *transaction, struct ref_update *update = updates[i]; if (update->lock) { - if (delete_ref_loose(update->lock, update->type, err)) + if (delete_ref_loose(update->lock, update->type, err)) { ret = TRANSACTION_GENERIC_ERROR; + goto cleanup; + } if (!(update->flags & REF_ISPRUNING)) delnames[delnum++] = update->lock->ref_name; } } - if (repack_without_refs(delnames, delnum, err)) + if (repack_without_refs(delnames, delnum, err)) { ret = TRANSACTION_GENERIC_ERROR; + goto cleanup; + } for (i = 0; i < delnum; i++) unlink_or_warn(git_path("logs/%s", delnames[i])); clear_loose_ref_cache(&ref_cache); |