diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-04-17 14:28:18 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2018-04-17 14:28:18 +0200 |
commit | 46a247f8c11e580d85ef6378848a15e17b8b5401 (patch) | |
tree | 86b4b64244641a0823d09bfee3e101e538edcfc9 /storage/filesystem/shallow.go | |
parent | 60fd949ef638cf688029c5784a0a449f4c562bc7 (diff) | |
download | go-git-46a247f8c11e580d85ef6378848a15e17b8b5401.tar.gz |
storage: filesystem, close shallow file when read
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
Diffstat (limited to 'storage/filesystem/shallow.go')
-rw-r--r-- | storage/filesystem/shallow.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/filesystem/shallow.go b/storage/filesystem/shallow.go index 4b2e2dc..173767c 100644 --- a/storage/filesystem/shallow.go +++ b/storage/filesystem/shallow.go @@ -41,6 +41,8 @@ func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) { return nil, err } + defer ioutil.CheckClose(f, &err) + var hash []plumbing.Hash scn := bufio.NewScanner(f) |