diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-21 06:05:19 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2019-07-29 17:32:34 +0200 |
commit | 172a0d8a0e1e05d0bc47df09d50fb8ef49529f5f (patch) | |
tree | 91d8f762673d2dd5ced806c0d59197db62494a83 /storage | |
parent | af46dd50e9e0bea569449c4a70fc9217594cb2ba (diff) | |
download | go-git-172a0d8a0e1e05d0bc47df09d50fb8ef49529f5f.tar.gz |
*: added missing error checks in tests
When we assign a value to err, make sure to also check for it being nil
afterwards. If those were intentionally unchecked, we should remove the
assignment in the first place. Those checks certainly never harm, but please
review thoroughly and let me know.
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 19d6f42a4d814a50bd262fbb69a9b670db9756a2)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/filesystem/dotgit/dotgit_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/storage/filesystem/dotgit/dotgit_test.go b/storage/filesystem/dotgit/dotgit_test.go index 73b0291..31c6fe0 100644 --- a/storage/filesystem/dotgit/dotgit_test.go +++ b/storage/filesystem/dotgit/dotgit_test.go @@ -226,6 +226,7 @@ func (s *SuiteDotGit) TestRemoveRefFromReferenceFileAndPackedRefs(c *C) { "refs/remotes/origin/branch", "e8d3ffab552895c19b9fcf7aa264d277cde33881", ), nil) + c.Assert(err, IsNil) // Make sure it only appears once in the refs list. refs, err := dir.Refs() |