diff options
| author | Jeff Carr <[email protected]> | 2024-12-27 04:55:57 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-27 04:55:57 -0600 |
| commit | 40830d3f383bd89993dec5edb0e3f7c814e7e71f (patch) | |
| tree | 65d86fc419f5d9b8312bb04fd1d3e70b854ee169 /gitTag.byAge.go | |
| parent | 328fbe9fdd619d0e3cb44d8529e95eb73c65692f (diff) | |
weird. NewestAge() took _seconds_ to run in some casesv0.0.41
Diffstat (limited to 'gitTag.byAge.go')
| -rw-r--r-- | gitTag.byAge.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gitTag.byAge.go b/gitTag.byAge.go index 3341e08..eacf757 100644 --- a/gitTag.byAge.go +++ b/gitTag.byAge.go @@ -31,10 +31,13 @@ func (a GitTagAge) Less(i, j int) bool { func (a GitTagAge) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func (repo *Repo) NewestAge() time.Duration { - all := repo.Tags.SortByAge() - for all.Scan() { - r := all.Next() - return time.Since(r.GetAuthordate().AsTime()) - } - return time.Since(time.Now()) + return time.Since(repo.Times.NewestCommit.AsTime()) + /* + all := repo.Tags.SortByAge() + for all.Scan() { + r := all.Next() + return time.Since(r.GetAuthordate().AsTime()) + } + return time.Since(time.Now()) + */ } |
