diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-04 01:45:11 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-05-04 01:45:11 +0200 |
commit | ff18ce3751ad80cfd0297845872ba1d796c36ca5 (patch) | |
tree | 0b0a72f26482bc61bad7258d10a9a2d1392d2b90 /plumbing/memory.go | |
parent | 5592dabdf9eed67c92b0e411ad375ae763119fd2 (diff) | |
download | go-git-ff18ce3751ad80cfd0297845872ba1d796c36ca5.tar.gz |
plumbing: MemoryObject.Writer tracks his own size
Diffstat (limited to 'plumbing/memory.go')
-rw-r--r-- | plumbing/memory.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plumbing/memory.go b/plumbing/memory.go index c65ce1f..51cbb54 100644 --- a/plumbing/memory.go +++ b/plumbing/memory.go @@ -51,6 +51,8 @@ func (o *MemoryObject) Writer() (io.WriteCloser, error) { func (o *MemoryObject) Write(p []byte) (n int, err error) { o.cont = append(o.cont, p...) + o.sz = int64(len(o.cont)) + return len(p), nil } |