0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-27 04:24:08 +01:00
gitea/modules/repository
zeripath 26ef180f46
Correctly rollback in ForkRepository (#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>
2021-09-14 18:16:40 +02:00
..
adopt.go Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
archive.go Fix archive error when rename repo or user (#16399) 2021-07-13 14:16:31 +02:00
branch.go
cache.go
check.go
commits_test.go Replace list.List with slices (#16311) 2021-08-09 14:08:51 -04:00
commits.go Report the correct number of pushes on the feeds (#16811) 2021-08-25 19:04:58 -04:00
create_test.go Fixed assert statements. (#16089) 2021-06-07 07:27:09 +02:00
create.go
fork_test.go Refactor the fork service slightly to take ForkRepoOptions (#16744) 2021-08-28 16:37:14 +08:00
fork.go Correctly rollback in ForkRepository (#17034) 2021-09-14 18:16:40 +02:00
generate.go
hooks.go Add agit flow support in gitea (#14295) 2021-07-28 17:42:56 +08:00
init.go
main_test.go
push.go
repo.go Add skip and limit to git.GetTags (#16897) 2021-09-10 19:30:37 +02:00
update.go