Skip to content

Commit b3f4f81

Browse files
zeripathlunnyjolheiser
authored
account for empty lines in receive-hook message (go-gitea#10773)
Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: John Olheiser <[email protected]>
1 parent 2fa1078 commit b3f4f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ func (err *ErrPushRejected) GenerateMessage() {
14231423
}
14241424
i += 8
14251425
nl := strings.IndexByte(err.StdErr[i:], '\n')
1426-
if nl > 0 {
1426+
if nl >= 0 {
14271427
messageBuilder.WriteString(err.StdErr[i : i+nl+1])
14281428
i = i + nl + 1
14291429
} else {

0 commit comments

Comments
 (0)