mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 13:13:59 +01:00
a35714372d
Related to #22362. I overlooked that there's always `committer.Close()`, like: ```go ctx, committer, err := db.TxContext(db.DefaultContext) if err != nil { return nil } defer committer.Close() // ... if err != nil { return nil } // ... return committer.Commit() ``` So the `Close` of `halfCommitter` should ignore `commit and close`, it's not a rollback. See: [Why `halfCommitter` and `WithTx` should rollback IMMEDIATELY or commit LATER](https://github.com/go-gitea/gitea/pull/22366#issuecomment-1374778612). Co-authored-by: techknowlogick <techknowlogick@gitea.io> |
||
---|---|---|
.. | ||
activities | ||
admin | ||
asymkey | ||
auth | ||
avatars | ||
db | ||
fixtures | ||
git | ||
issues | ||
migrations | ||
organization | ||
packages | ||
perm | ||
project | ||
pull | ||
repo | ||
secret | ||
system | ||
unit | ||
unittest | ||
user | ||
webhook | ||
error.go | ||
fixture_generation.go | ||
fixture_test.go | ||
main_test.go | ||
migrate.go | ||
migrate_test.go | ||
org.go | ||
org_team.go | ||
org_team_test.go | ||
org_test.go | ||
repo.go | ||
repo_collaboration.go | ||
repo_collaboration_test.go | ||
repo_test.go | ||
repo_transfer.go | ||
repo_transfer_test.go | ||
user.go |