summaryrefslogtreecommitdiffstats
path: root/routers/private/hook_post_receive.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/hook_post_receive.go')
-rw-r--r--routers/private/hook_post_receive.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/private/hook_post_receive.go b/routers/private/hook_post_receive.go
index d5a46e4e7f..1b274ae154 100644
--- a/routers/private/hook_post_receive.go
+++ b/routers/private/hook_post_receive.go
@@ -159,8 +159,7 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
}
// If we've pushed a branch (and not deleted it)
- if newCommitID != git.EmptySHA && 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)