diff --git a/models/git_diff.go b/models/git_diff.go index 5b3d4932f..ef1047961 100644 --- a/models/git_diff.go +++ b/models/git_diff.go @@ -260,7 +260,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D if err != nil && err != bufio.ErrBufferFull { return nil, fmt.Errorf("PeekByte: %v", err) } - newLine := bytes.IndexByte(peek, '\n'); + newLine := bytes.IndexByte(peek, '\n') if newLine == -1 { // Instead of reading things, and copying memory around, // we simply discard them (which doesn't allocate memory)