aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/index
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2020-07-01 20:51:24 +0200
committerOleg Kovalov <iamolegkovalov@gmail.com>2020-07-01 20:51:24 +0200
commit27a034c7643768a4ad486a64e8a1b59fa3f8b3b4 (patch)
tree9d6e25bf60cbd0e1aabbba687f2655867f113c1e /plumbing/format/index
parent9ac753f4afb36feb1a1c22214c16e853db54aa00 (diff)
downloadgo-git-27a034c7643768a4ad486a64e8a1b59fa3f8b3b4.tar.gz
fix goreportcard warnings
Diffstat (limited to 'plumbing/format/index')
-rw-r--r--plumbing/format/index/decoder.go4
-rw-r--r--plumbing/format/index/encoder_test.go3
2 files changed, 5 insertions, 2 deletions
diff --git a/plumbing/format/index/decoder.go b/plumbing/format/index/decoder.go
index 79d0b9e..d341d59 100644
--- a/plumbing/format/index/decoder.go
+++ b/plumbing/format/index/decoder.go
@@ -390,7 +390,9 @@ func (d *treeExtensionDecoder) readEntry() (*TreeEntry, error) {
e.Trees = i
_, err = io.ReadFull(d.r, e.Hash[:])
-
+ if err != nil {
+ return nil, err
+ }
return e, nil
}
diff --git a/plumbing/format/index/encoder_test.go b/plumbing/format/index/encoder_test.go
index 17585a0..b7a73cb 100644
--- a/plumbing/format/index/encoder_test.go
+++ b/plumbing/format/index/encoder_test.go
@@ -5,9 +5,10 @@ import (
"strings"
"time"
+ "github.com/go-git/go-git/v5/plumbing"
+
"github.com/google/go-cmp/cmp"
. "gopkg.in/check.v1"
- "github.com/go-git/go-git/v5/plumbing"
)
func (s *IndexSuite) TestEncode(c *C) {