]> source.dussan.org Git - gitea.git/commit
Sync branches to DB immediately when handle git hook calling (#29493)
authorJason Song <i@wolfogre.com>
Wed, 6 Mar 2024 08:47:52 +0000 (16:47 +0800)
committerGitHub <noreply@github.com>
Wed, 6 Mar 2024 08:47:52 +0000 (16:47 +0800)
commit5bdf805e054ec4131d8f1451752f251e8807cc73
treed561ee241696a7fbb134d1ebc4f53cd4e7d72976
parenta2b0fb1a64b0794b808a013089758a49f56d8915
Sync branches to DB immediately when handle git hook calling (#29493)

Unlike other async processing in the queue, we should sync branches to
the DB immediately when handling git hook calling. If it fails, users
can see the error message in the output of the git command.

It can avoid potential inconsistency issues, and help #29494.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
models/git/branch.go
routers/private/hook_post_receive.go
services/repository/branch.go
services/repository/push.go
tests/integration/git_push_test.go [new file with mode: 0644]