mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-25 17:30:36 +00: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> |
||
---|---|---|
.. | ||
install | ||
paginator | ||
common.go | ||
consistency.go | ||
context.go | ||
context_committer_test.go | ||
context_test.go | ||
convert.go | ||
engine.go | ||
engine_test.go | ||
error.go | ||
index.go | ||
index_test.go | ||
iterate.go | ||
iterate_test.go | ||
list_options.go | ||
log.go | ||
main_test.go | ||
name.go | ||
search.go | ||
sequence.go | ||
sql_postgres_with_schema.go |