Support lines of length more than 4096 bytes#24
Conversation
There was a problem hiding this comment.
it may be best to make readLine return a slice of lines by splitting read lines per Config.MaxLineSize, as otherwise there is no limit on how much buf can grow.
There was a problem hiding this comment.
@masahide sorry - it looks like i overlooked something. two months ago, i noted above that the buf variable can grow unbounded, as the for loop doesn't split it per the MaxLineSize setting and return a slice of lines. did you make any code changes for this? i don't see it in the current diff.
There was a problem hiding this comment.
Please try View full changes.
if !isPrefix || tail.MaxLineSize > 0 {
return line, err
}
for loop is not performed if MaxLineSize is greater than or equal to zero.
Does this have a problem?
There was a problem hiding this comment.
It seems that "the diff display" is wrong by "git push -f."
|
👍 |
There was a problem hiding this comment.
Because it contains the buffer newlines code, add 2 bytes of CR/LF.
|
Please confirm it, tried to change to be set MaxLineSize to the bufio.reader. |
|
@masahide looks good. please rebase your branch, and then i'll merge it. |
|
The rebasing. |
|
you need to rebase the master branch. your branch is outdated, compare to, try: |
|
I am sorry. |
|
@masahide - see my line note abvove. |
Support lines of length more than 4096 bytes
|
all good, thanks for the work @masahide |
|
thanks! |
Merged funkygao/tail@c5abc6d to correct the problem that occurs in the line of more than 4096 bytes.
And add test code.