If the transaction fails we will be left repository in the wrong place _Originally posted by @zeripath in https://github.com/go-gitea/gitea/pull/14792#discussion_r584185299_