aboutsummaryrefslogtreecommitdiffstats
path: root/prune.go
diff options
context:
space:
mode:
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
}