diff options
Diffstat (limited to 'reloadTags.go')
| -rw-r--r-- | reloadTags.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/reloadTags.go b/reloadTags.go index e8409dc..2510ff1 100644 --- a/reloadTags.go +++ b/reloadTags.go @@ -66,6 +66,18 @@ func (repo *Repo) reloadGitTags() error { repo.Tags.Append(&newr) } + + // also set the repo.NewestCommit + cmd = []string{"git", "log", "-1", "--format=%cd"} + result = shell.PathRunQuiet(repo.FullPath, cmd) + if result.Error != nil { + log.Warn("git for-each-ref error:", result.Error) + return result.Error + } + newest := strings.Join(result.Stdout, "\n") + newest = strings.TrimSpace(newest) + tmp := getGitDateStamp(newest) + repo.Times.NewestCommit = timestamppb.New(tmp) return nil } |
