From 26cf5055a2cfb937418ff1fd7d590c43a8d2d894 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Jan 2025 02:39:08 -0600 Subject: save the last Reload() time --- humanShowRepo.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'humanShowRepo.go') diff --git a/humanShowRepo.go b/humanShowRepo.go index 4b6e436..a1d462b 100644 --- a/humanShowRepo.go +++ b/humanShowRepo.go @@ -60,15 +60,18 @@ func (f *Forge) HumanPrintRepo(check *gitpb.Repo) { found.AppendUniqueGoPath(check) f.PrintHumanTable(found) - printTime("LastPull", check.Times.LastPull.AsTime()) - printTime("LastUpdate", check.Times.LastUpdate.AsTime()) - printTime("LastDirty", check.Times.LastDirty.AsTime()) + printTime("Last Pull", check.Times.LastPull.AsTime()) + printTime("Last Dirty", check.Times.LastDirty.AsTime()) printTime("dir mtime", check.Times.MtimeDir.AsTime()) printTime("HEAD mtime", check.Times.MtimeHead.AsTime()) printTime("Index mtime", check.Times.MtimeIndex.AsTime()) printTime("fetch", check.Times.MtimeFetch.AsTime()) printTime("last go.sum", check.Times.LastGoDep.AsTime()) printTime("last commit", check.Times.NewestCommit.AsTime()) + + now := time.Now() + dur := now.Sub(check.Times.LastUpdate.AsTime()) + log.Printf("Repo Last Reload: %s\n", shell.FormatDuration(dur)) } func (f *Forge) testGoRepo(check *gitpb.Repo) { -- cgit v1.2.3