From 172a0d8a0e1e05d0bc47df09d50fb8ef49529f5f Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 21 Jul 2019 06:05:19 +0200 Subject: *: 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 (cherry picked from commit 19d6f42a4d814a50bd262fbb69a9b670db9756a2) --- worktree_commit_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'worktree_commit_test.go') diff --git a/worktree_commit_test.go b/worktree_commit_test.go index da377c6..5bcbac9 100644 --- a/worktree_commit_test.go +++ b/worktree_commit_test.go @@ -210,7 +210,7 @@ func (s *WorktreeSuite) TestCommitTreeSort(c *C) { r, err := Init(st, nil) c.Assert(err, IsNil) - r, err = Clone(memory.NewStorage(), memfs.New(), &CloneOptions{ + r, _ = Clone(memory.NewStorage(), memfs.New(), &CloneOptions{ URL: path, }) -- cgit