Skip to content

Commit

Permalink
account for empty lines in receive-hook message (#10773) (#10784)
Browse files Browse the repository at this point in the history
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
  • Loading branch information
4 people authored Mar 21, 2020
1 parent 602fe45 commit 6ee6731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ func (err *ErrPushRejected) GenerateMessage() {
}
i += 8
nl := strings.IndexByte(err.StdErr[i:], '\n')
if nl > 0 {
if nl >= 0 {
messageBuilder.WriteString(err.StdErr[i : i+nl+1])
i = i + nl + 1
} else {
Expand Down

0 comments on commit 6ee6731

Please sign in to comment.