aboutsummaryrefslogtreecommitdiffstats
path: root/prune.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 /prune.go
parentaa092f5474da3e9c3ff4f40b88849726b645f39f (diff)
downloadgo-git-b18457df6a1f75283d95999fde5c162ba1a19651.tar.gz
storage: some minor code cleanup
Suggested by mcuadros. Issue: #669
Diffstat (limited to 'prune.go')
-rw-r--r--prune.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/prune.go b/prune.go
index fce3bfd..81f2582 100644
--- a/prune.go
+++ b/prune.go
@@ -28,7 +28,7 @@ func (r *Repository) Prune(opt PruneOptions) error {
return err
}
// Now walk all (loose) objects in storage.
- err = r.Storer.ForEachObjectHash(func(hash plumbing.Hash) error {
+ return r.Storer.ForEachObjectHash(func(hash plumbing.Hash) error {
// Get out if we have seen this object.
if pw.isSeen(hash) {
return nil
@@ -49,8 +49,4 @@ func (r *Repository) Prune(opt PruneOptions) error {
}
return opt.Handler(hash)
})
- if err != nil {
- return err
- }
- return nil
}