From 7e8d7125446bb6e12a056a5a6ca979727790d0df Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Thu, 15 Sep 2016 21:20:58 +0200 Subject: dotgit: synced write packfile and index generation --- formats/packfile/scanner.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'formats/packfile/scanner.go') 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, } } -- cgit