Skip to content

Commit

Permalink
fix showing pull request link when delete a branch (#5166)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored and techknowlogick committed Oct 28, 2018
1 parent fb14458 commit a2ee2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a2ee2a3

Please sign in to comment.