diff --git a/pkg/backend/repo.go b/pkg/backend/repo.go index bacc8993848b638d4090b79e9f50a348446aa99a..0470c1f990ca3acd21f57e3568b2660c5da74ee2 100644 --- a/pkg/backend/repo.go +++ b/pkg/backend/repo.go @@ -718,13 +718,6 @@ func (r *repo) CreatedAt() time.Time { // UpdatedAt returns the repository's last update time. func (r *repo) UpdatedAt() time.Time { - // Try to read the last modified time from the info directory. - if t, err := readOneline(filepath.Join(r.path, "info", "last-modified")); err == nil { - if t, err := time.Parse(time.RFC3339, t); err == nil { - return t - } - } - rr, err := git.Open(r.path) if err == nil { t, err := rr.LatestCommitTime() @@ -733,6 +726,12 @@ func (r *repo) UpdatedAt() time.Time { } } + if t, err := readOneline(filepath.Join(r.path, "info", "last-modified")); err == nil { + if t, err := time.Parse(time.RFC3339, t); err == nil { + return t + } + } + return r.repo.UpdatedAt }