diff options
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 { |