account for empty lines in receive-hook message (#10773) (#10784)

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: John Olheiser <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
This commit is contained in:
zeripath
2020-03-21 10:49:02 +08:00
committed by GitHub
co-authored by GitHub Lunny Xiao John Olheiser Lauris BH
parent 602fe45936
commit 6ee6731290
+1 -1
View File
@@ -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 {