Skip to content

Commit

Permalink
Don't skip parsing when hunk is the last in file
Browse files Browse the repository at this point in the history
  • Loading branch information
eseliger committed May 26, 2020
1 parent 6e43c89 commit 75d7ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff/parse.go
Expand Up @@ -80,7 +80,7 @@ func (r *MultiFileDiffReader) ReadFile() (*FileDiff, error) {
// need to perform the check here.
hr := fr.HunksReader()
line, err := readLine(r.reader)
if err != nil {
if err != nil && err != io.EOF {
return fd, err
}
line = bytes.TrimSuffix(line, []byte{'\n'})
Expand Down

0 comments on commit 75d7ce2

Please sign in to comment.