Skip to content

Commit 6ee6731

Browse files
zeripathlunnyjolheiserlafriks
authored
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]>
1 parent 602fe45 commit 6ee6731

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
@@ -1407,7 +1407,7 @@ func (err *ErrPushRejected) GenerateMessage() {
14071407
}
14081408
i += 8
14091409
nl := strings.IndexByte(err.StdErr[i:], '\n')
1410-
if nl > 0 {
1410+
if nl >= 0 {
14111411
messageBuilder.WriteString(err.StdErr[i : i+nl+1])
14121412
i = i + nl + 1
14131413
} else {

0 commit comments

Comments
 (0)