Set the missing discard(1) in repo_language_stats.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
defer cancel()
writeID := func(id string) error {
- _, err := batchStdinWriter.Write([]byte(id))
- if err != nil {
- return err
- }
- _, err = batchStdinWriter.Write([]byte{'\n'})
+ _, err := batchStdinWriter.Write([]byte(id + "\n"))
return err
}
}
sizeToRead := size
- discard := int64(0)
+ discard := int64(1)
if size > fileSizeLimit {
sizeToRead = fileSizeLimit
- discard = size - fileSizeLimit
+ discard = size - fileSizeLimit + 1
}
_, err = contentBuf.ReadFrom(io.LimitReader(batchReader, sizeToRead))