diff options
| author | Jeff Carr <[email protected]> | 2025-09-26 06:06:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-26 06:07:46 -0500 |
| commit | 3510ad9cda8f4f5654260863469f7aa723b5beb6 (patch) | |
| tree | 7dd2ae98ae10e4384415bae2d3f23cd7cb83a3aa | |
| parent | bfa05528e5f818cf8b281a618f01141c294cc2ff (diff) | |
| -rw-r--r-- | age.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -49,14 +49,16 @@ func (repo *Repo) GitChanged() bool { } func (repo *Repo) GitPullAge() time.Duration { - lastpull, err := repo.LastGitPull() - if err == nil { + // lastpull, err := repo.LastGitPull() + lasttime, err := repo.oldMtime(".git/FETCH_HEAD") + if err != nil { // if error, something is wrong, assume true + log.Info("GitPullAge missing .git/FETCH_HEAD", repo.FullPath) ltime := repo.Times.LastPull.AsTime() return time.Since(ltime) } - return time.Since(lastpull) + return time.Since(lasttime) } func (repo *Repo) oldMtime(filename string) (time.Time, error) { |
