aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/object.go
diff options
context:
space:
mode:
authorJeremy Stribling <strib@alum.mit.edu>2017-11-29 13:57:36 -0800
committerJeremy Stribling <strib@alum.mit.edu>2017-11-29 13:58:41 -0800
commitb18457df6a1f75283d95999fde5c162ba1a19651 (patch)
tree16080d7fd9fd2af51607f951b43548dc208975fd /storage/filesystem/object.go
parentaa092f5474da3e9c3ff4f40b88849726b645f39f (diff)
downloadgo-git-b18457df6a1f75283d95999fde5c162ba1a19651.tar.gz
storage: some minor code cleanup
Suggested by mcuadros. Issue: #669
Diffstat (limited to 'storage/filesystem/object.go')
-rw-r--r--storage/filesystem/object.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/storage/filesystem/object.go b/storage/filesystem/object.go
index 34501ec..6ca67cc 100644
--- a/storage/filesystem/object.go
+++ b/storage/filesystem/object.go
@@ -509,13 +509,10 @@ func hashListAsMap(l []plumbing.Hash) map[plumbing.Hash]bool {
func (s *ObjectStorage) ForEachObjectHash(fun func(plumbing.Hash) error) error {
err := s.dir.ForEachObjectHash(fun)
- if err != nil {
- if err == storer.ErrStop {
- return nil
- }
- return err
+ if err == storer.ErrStop {
+ return nil
}
- return nil
+ return err
}
func (s *ObjectStorage) LooseObjectTime(hash plumbing.Hash) (time.Time, error) {