Skip to content

Commit

Permalink
use time.IsZero in Prune
Browse files Browse the repository at this point in the history
Signed-off-by: u5surf <[email protected]>
  • Loading branch information
u5surf committed Oct 2, 2018
1 parent 1fdd36c commit 41af429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41af429

Please sign in to comment.