Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit ba9c38b

Browse files
authored
Merge pull request #974 from u5surf/issue-813
use time.IsZero in Prune
2 parents 80afdec + 41af429 commit ba9c38b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prune.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (r *Repository) Prune(opt PruneOptions) error {
4949
}
5050
// Otherwise it is a candidate for pruning.
5151
// Check out for too new objects next.
52-
if opt.OnlyObjectsOlderThan != (time.Time{}) {
52+
if !opt.OnlyObjectsOlderThan.IsZero() {
5353
// Errors here are non-fatal. The object may be e.g. packed.
5454
// Or concurrently deleted. Skip such objects.
5555
t, err := los.LooseObjectTime(hash)

0 commit comments

Comments
 (0)