From 41af4294c1347c2f35e255d4ac01ecd25b9d5d55 Mon Sep 17 00:00:00 2001 From: u5surf Date: Tue, 2 Oct 2018 20:04:47 +0900 Subject: use time.IsZero in Prune Signed-off-by: u5surf --- prune.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prune.go') 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) -- cgit