diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2021-12-10 06:58:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 06:58:09 +0100 |
commit | e60e348f614a7272e4a51bdee8ba20f059ca4cce (patch) | |
tree | 15e8b08e313251925d95cb327bcf98e8f245f2ee /plumbing/format/packfile/packfile_test.go | |
parent | 32c4f532abd57797322e97d95dfa02821980e309 (diff) | |
parent | 557a1fdcaabd51899b9213175762ed9603409985 (diff) | |
download | go-git-e60e348f614a7272e4a51bdee8ba20f059ca4cce.tar.gz |
Merge pull request #418 from abhinav/unused
Remove unused vars/types/funcs/fields
Diffstat (limited to 'plumbing/format/packfile/packfile_test.go')
-rw-r--r-- | plumbing/format/packfile/packfile_test.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/plumbing/format/packfile/packfile_test.go b/plumbing/format/packfile/packfile_test.go index 6af8817..2eb099d 100644 --- a/plumbing/format/packfile/packfile_test.go +++ b/plumbing/format/packfile/packfile_test.go @@ -8,7 +8,6 @@ import ( "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/format/idxfile" "github.com/go-git/go-git/v5/plumbing/format/packfile" - "github.com/go-git/go-git/v5/plumbing/storer" . "gopkg.in/check.v1" ) @@ -236,22 +235,6 @@ var expectedHashes = []string{ "7e59600739c96546163833214c36459e324bad0a", } -func assertObjects(c *C, s storer.EncodedObjectStorer, expects []string) { - i, err := s.IterEncodedObjects(plumbing.AnyObject) - c.Assert(err, IsNil) - - var count int - err = i.ForEach(func(plumbing.EncodedObject) error { count++; return nil }) - c.Assert(err, IsNil) - c.Assert(count, Equals, len(expects)) - - for _, exp := range expects { - obt, err := s.EncodedObject(plumbing.AnyObject, plumbing.NewHash(exp)) - c.Assert(err, IsNil) - c.Assert(obt.Hash().String(), Equals, exp) - } -} - func getIndexFromIdxFile(r io.Reader) idxfile.Index { idx := idxfile.NewMemoryIndex() if err := idxfile.NewDecoder(r).Decode(idx); err != nil { |