diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-10-29 06:15:25 +0800 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-10-28 18:15:25 -0400 |
commit | a2ee2a3c67304920a968c1c852e43b3dc2d7c3e7 (patch) | |
tree | 7f559a629f22089dfefcd14947079cc7712565a2 /cmd | |
parent | fb14458010e1c18dc08549bbe83cab56fc690bc7 (diff) | |
download | gitea-a2ee2a3c67304920a968c1c852e43b3dc2d7c3e7.tar.gz gitea-a2ee2a3c67304920a968c1c852e43b3dc2d7c3e7.zip |
fix showing pull request link when delete a branch (#5166)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/hook.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/hook.go b/cmd/hook.go index 70849f5142..27500f9c66 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -214,7 +214,7 @@ func runHookPostReceive(c *cli.Context) error { log.GitLogger.Error(2, "Update: %v", err) } - if strings.HasPrefix(refFullName, git.BranchPrefix) { + if newCommitID != git.EmptySHA && strings.HasPrefix(refFullName, git.BranchPrefix) { branch := strings.TrimPrefix(refFullName, git.BranchPrefix) repo, pullRequestAllowed, err := private.GetRepository(repoID) if err != nil { |