diff options
author | Abhinav Gupta <mail@abhinavg.net> | 2021-11-27 14:26:38 -0800 |
---|---|---|
committer | Abhinav Gupta <mail@abhinavg.net> | 2021-11-27 16:39:09 -0800 |
commit | 07a8bcc71afb5814c00c7a7b19c29b0c493a18fd (patch) | |
tree | e57ec50bc3e51cea46fc589c4a3cd0586869a2aa /worktree_test.go | |
parent | e4fcd078d42e945581616855ab78d8b7ed12df6c (diff) | |
download | go-git-07a8bcc71afb5814c00c7a7b19c29b0c493a18fd.tar.gz |
Remove unused variables/types/functions
[staticcheck](https://staticcheck.io/) reported a number of unused
fields, functions, types, and variables across the code.
Where possible, use them (assert unchecked errors in tests, for example)
and otherwise remove them.
Diffstat (limited to 'worktree_test.go')
-rw-r--r-- | worktree_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/worktree_test.go b/worktree_test.go index 79cbefd..97dcc30 100644 --- a/worktree_test.go +++ b/worktree_test.go @@ -183,7 +183,7 @@ func (s *WorktreeSuite) TestPullInSingleBranch(c *C) { c.Assert(err, IsNil) c.Assert(branch.Hash().String(), Equals, "6ecf0ef2c2dffb796033e5a02219af86ec6584e5") - branch, err = r.Reference("refs/remotes/foo/branch", false) + _, err = r.Reference("refs/remotes/foo/branch", false) c.Assert(err, NotNil) storage := r.Storer.(*memory.Storage) @@ -555,6 +555,7 @@ func (s *WorktreeSuite) TestCheckoutRelativePathSubmoduleInitialized(c *C) { // test submodule path modules, err := w.readGitmodulesFile() + c.Assert(err, IsNil) c.Assert(modules.Submodules["basic"].URL, Equals, "../basic.git") c.Assert(modules.Submodules["itself"].URL, Equals, "../submodule.git") |