diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-09-15 21:20:58 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-09-15 21:20:58 +0200 |
commit | 7e8d7125446bb6e12a056a5a6ca979727790d0df (patch) | |
tree | df07bada01b332d00131c33034d88935357ba0d1 /formats/packfile/scanner.go | |
parent | d57f90b78eeb6b09b15e3fe57609ede66df4edac (diff) | |
download | go-git-7e8d7125446bb6e12a056a5a6ca979727790d0df.tar.gz |
dotgit: synced write packfile and index generation
Diffstat (limited to 'formats/packfile/scanner.go')
-rw-r--r-- | formats/packfile/scanner.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/formats/packfile/scanner.go b/formats/packfile/scanner.go index 86092a1..a5e4215 100644 --- a/formats/packfile/scanner.go +++ b/formats/packfile/scanner.go @@ -49,6 +49,10 @@ type Scanner struct { // is waiting to be read pendingObject *ObjectHeader version, objects uint32 + + // lsSeekable says if this scanner can do Seek or not, to have a Scanner + // seekable a r implementing io.Seeker is required + IsSeekable bool } // NewScanner returns a new Scanner based on a reader, if the given reader @@ -65,7 +69,8 @@ func NewScanner(r io.Reader) *Scanner { newByteReadSeeker(seeker), crc, }, - crc: crc, + crc: crc, + IsSeekable: ok, } } |