diff options
Diffstat (limited to 'plumbing/format/idxfile/decoder.go')
-rw-r--r-- | plumbing/format/idxfile/decoder.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plumbing/format/idxfile/decoder.go b/plumbing/format/idxfile/decoder.go index 6618475..fea5f0b 100644 --- a/plumbing/format/idxfile/decoder.go +++ b/plumbing/format/idxfile/decoder.go @@ -1,6 +1,7 @@ package idxfile import ( + "bufio" "bytes" "errors" "io" @@ -19,12 +20,12 @@ var ( // Decoder reads and decodes idx files from an input stream. type Decoder struct { - io.Reader + *bufio.Reader } // NewDecoder builds a new idx stream decoder, that reads from r. func NewDecoder(r io.Reader) *Decoder { - return &Decoder{r} + return &Decoder{bufio.NewReader(r)} } // Decode reads from the stream and decode the content into the Idxfile struct. |