diff options
Diffstat (limited to 'reloadTags.go')
| -rw-r--r-- | reloadTags.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/reloadTags.go b/reloadTags.go index a40f2de..76071a5 100644 --- a/reloadTags.go +++ b/reloadTags.go @@ -36,9 +36,9 @@ func (repo *Repo) AllCommits() error { */ // reload the tags -func (repo *Repo) reloadGitTags() error { +func (repo *Repo) reloadStats() error { // todo: look for changes in the tags? - repo.Tags = new(GitTags) + repo.Tags = NewStats() tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"} format := strings.Join(tags, "_,,,_") @@ -87,12 +87,12 @@ func (repo *Repo) reloadGitTags() error { refname = parts[3] subject = parts[4] - newr := GitTag{ - Refname: refname, - Hash: hash, - Subject: subject, - Creatordate: ctime, - Authordate: atime, + newr := Stat{ + Name: refname, + Hash: hash, + Subject: subject, + CommitTime: ctime, + AuthorTime: atime, } repo.Tags.Append(&newr) @@ -162,11 +162,11 @@ func getGitDateStamp(gitdefault string) time.Time { return tagTime } -func (tag *GitTag) GetAge() time.Duration { - return time.Since(tag.GetAuthordate().AsTime()) +func (tag *Stat) GetAge() time.Duration { + return time.Since(tag.GetAuthorTime().AsTime()) } -func (repo *Repo) NewestTag() *GitTag { +func (repo *Repo) NewestTag() *Stat { loop := repo.Tags.SortByAge() for loop.Scan() { r := loop.Next() |
