aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2021-12-10 06:58:09 +0100
committerGitHub <noreply@github.com>2021-12-10 06:58:09 +0100
commite60e348f614a7272e4a51bdee8ba20f059ca4cce (patch)
tree15e8b08e313251925d95cb327bcf98e8f245f2ee /storage
parent32c4f532abd57797322e97d95dfa02821980e309 (diff)
parent557a1fdcaabd51899b9213175762ed9603409985 (diff)
downloadgo-git-e60e348f614a7272e4a51bdee8ba20f059ca4cce.tar.gz
Merge pull request #418 from abhinav/unused
Remove unused vars/types/funcs/fields
Diffstat (limited to 'storage')
-rw-r--r--storage/filesystem/dotgit/dotgit_test.go2
-rw-r--r--storage/filesystem/object_test.go2
-rw-r--r--storage/transactional/config_test.go2
-rw-r--r--storage/transactional/reference.go4
4 files changed, 3 insertions, 7 deletions
diff --git a/storage/filesystem/dotgit/dotgit_test.go b/storage/filesystem/dotgit/dotgit_test.go
index 1a09fde..a8f0eb7 100644
--- a/storage/filesystem/dotgit/dotgit_test.go
+++ b/storage/filesystem/dotgit/dotgit_test.go
@@ -654,7 +654,7 @@ func (s *SuiteDotGit) TestObject(c *C) {
fs.MkdirAll(incomingDirPath, os.FileMode(0755))
fs.Create(incomingFilePath)
- file, err = dir.Object(plumbing.NewHash(incomingHash))
+ _, err = dir.Object(plumbing.NewHash(incomingHash))
c.Assert(err, IsNil)
}
diff --git a/storage/filesystem/object_test.go b/storage/filesystem/object_test.go
index 1c3267b..19a7914 100644
--- a/storage/filesystem/object_test.go
+++ b/storage/filesystem/object_test.go
@@ -386,7 +386,7 @@ func (s *FsSuite) TestGetFromObjectFileSharedCache(c *C) {
c.Assert(err, IsNil)
c.Assert(obj.Hash(), Equals, expected)
- obj, err = o2.EncodedObject(plumbing.CommitObject, expected)
+ _, err = o2.EncodedObject(plumbing.CommitObject, expected)
c.Assert(err, Equals, plumbing.ErrObjectNotFound)
}
diff --git a/storage/transactional/config_test.go b/storage/transactional/config_test.go
index 1f3a572..34d7763 100644
--- a/storage/transactional/config_test.go
+++ b/storage/transactional/config_test.go
@@ -54,7 +54,7 @@ func (s *ConfigSuite) TestSetConfigTemporal(c *C) {
cfg, err = cs.Config()
c.Assert(err, IsNil)
- c.Assert(temporalCfg.Core.Worktree, Equals, "bar")
+ c.Assert(cfg.Core.Worktree, Equals, "bar")
}
func (s *ConfigSuite) TestCommit(c *C) {
diff --git a/storage/transactional/reference.go b/storage/transactional/reference.go
index 3b009e2..1c09307 100644
--- a/storage/transactional/reference.go
+++ b/storage/transactional/reference.go
@@ -15,9 +15,6 @@ type ReferenceStorage struct {
// commit is requested, the entries are added when RemoveReference is called
// and deleted if SetReference is called.
deleted map[plumbing.ReferenceName]struct{}
- // packRefs if true PackRefs is going to be called in the based storer when
- // commit is called.
- packRefs bool
}
// NewReferenceStorage returns a new ReferenceStorer based on a base storer and
@@ -108,7 +105,6 @@ func (r ReferenceStorage) CountLooseRefs() (int, error) {
// PackRefs honors the storer.ReferenceStorer interface.
func (r ReferenceStorage) PackRefs() error {
- r.packRefs = true
return nil
}