mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-11 22:59:54 +08:00
270c7f36db
Backport #17034 The rollback functionality in services/repository/repository.go:ForkRepository is incorrect and could lead to a deadlock as it uses DeleteRepository to delete the rolled-back repository - a function which creates its own transaction. This PR adjusts the rollback function to only use RemoveAll as any database changes will be automatically rolled-back. It also handles panics and adjusts the Close within WithTx to ensure that if there is a panic the session will always be closed. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> |
||
---|---|---|
.. | ||
adopt.go | ||
archive.go | ||
branch.go | ||
cache.go | ||
check.go | ||
commits_test.go | ||
commits.go | ||
create_test.go | ||
create.go | ||
fork_test.go | ||
fork.go | ||
generate.go | ||
hooks.go | ||
init.go | ||
main_test.go | ||
push.go | ||
repo.go | ||
update.go |