Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit fbe632e

Browse files
authored
Merge pull request #696 from ferhatelmas/simplify-again
*: simplication
2 parents 757a260 + 9a9f352 commit fbe632e

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

object_walker.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ func (p *objectWalker) walkAllRefs() error {
3636
}
3737
return p.walkObjectTree(ref.Hash())
3838
})
39-
if err != nil {
40-
return err
41-
}
42-
return nil
39+
return err
4340
}
4441

4542
func (p *objectWalker) isSeen(hash plumbing.Hash) bool {

storage/filesystem/internal/dotgit/dotgit.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,7 @@ func (d *DotGit) DeleteOldObjectPackAndIndex(hash plumbing.Hash, t time.Time) er
212212
if err != nil {
213213
return err
214214
}
215-
err = d.fs.Remove(d.objectPackPath(hash, `idx`))
216-
if err != nil {
217-
return err
218-
}
219-
return nil
215+
return d.fs.Remove(d.objectPackPath(hash, `idx`))
220216
}
221217

222218
// NewObject return a writer for a new object file.

worktree_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ func (s *WorktreeSuite) TestGrep(c *C) {
14811481
break
14821482
}
14831483
}
1484-
if found != true {
1484+
if !found {
14851485
c.Errorf("unexpected grep results for %q, expected result to contain: %v", tc.name, wantResult)
14861486
}
14871487
}
@@ -1496,7 +1496,7 @@ func (s *WorktreeSuite) TestGrep(c *C) {
14961496
break
14971497
}
14981498
}
1499-
if found != false {
1499+
if found {
15001500
c.Errorf("unexpected grep results for %q, expected result to NOT contain: %v", tc.name, dontWantResult)
15011501
}
15021502
}

0 commit comments

Comments
 (0)