aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-10-09 06:32:36 +0200
committerGitHub <noreply@github.com>2018-10-09 06:32:36 +0200
commitba9c38b7c7cb0bbdeadfb599f080999016338572 (patch)
tree1063e40095d8861f8f45e9478e529c1f923e9eb2
parent80afdec53d1bb2e8cc018896e6850858c6dd768a (diff)
parent41af4294c1347c2f35e255d4ac01ecd25b9d5d55 (diff)
downloadgo-git-ba9c38b7c7cb0bbdeadfb599f080999016338572.tar.gz
Merge pull request #974 from u5surf/issue-813
use time.IsZero in Prune
-rw-r--r--prune.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prune.go b/prune.go
index 04913d6..c840325 100644
--- a/prune.go
+++ b/prune.go
@@ -49,7 +49,7 @@ func (r *Repository) Prune(opt PruneOptions) error {
}
// Otherwise it is a candidate for pruning.
// Check out for too new objects next.
- if opt.OnlyObjectsOlderThan != (time.Time{}) {
+ if !opt.OnlyObjectsOlderThan.IsZero() {
// Errors here are non-fatal. The object may be e.g. packed.
// Or concurrently deleted. Skip such objects.
t, err := los.LooseObjectTime(hash)