diff options
author | yp05327 <576951401@qq.com> | 2024-02-26 17:10:14 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 08:10:14 +0000 |
commit | f8c1efe944c539396402fb014bbfdb67ba199ef2 (patch) | |
tree | 627f69010d07b8a02339be3d99f72ccb750087ee /routers | |
parent | 17f170ee3724d8bdf2ddaad4211b12433f78ff0e (diff) | |
download | gitea-f8c1efe944c539396402fb014bbfdb67ba199ef2.tar.gz gitea-f8c1efe944c539396402fb014bbfdb67ba199ef2.zip |
Fix logic error from #28138 (#29417)
There's a miss in #28138:

https://github.com/go-gitea/gitea/pull/28138/files#diff-2556e62ad7204a230c91927a3f2115e25a2b688240d0ee1de6d34f0277f37dfeR162
@lunny
Not sure about the impact of this, but it will only effect 1.22, and
maybe we should fix it ASAP.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/private/hook_post_receive.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/hook_post_receive.go b/routers/private/hook_post_receive.go index 8b954a8130..5ae03ce294 100644 --- a/routers/private/hook_post_receive.go +++ b/routers/private/hook_post_receive.go @@ -159,7 +159,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) { } // If we've pushed a branch (and not deleted it) - if git.IsEmptyCommitID(newCommitID) && refFullName.IsBranch() { + if !git.IsEmptyCommitID(newCommitID) && refFullName.IsBranch() { // First ensure we have the repository loaded, we're allowed pulls requests and we can get the base repo if repo == nil { repo = loadRepository(ctx, ownerName, repoName) |