git-ents.gitmain
⌘K
foforge
commit 2d6d782
fix: use the shared relative-time helper for the overview Updated line

The repo overview asked git itself to format the last commit age via --format=%ar, wording like 3 weeks ago that follows gits own rules rather than the ago() helper every other timestamp on the site goes through (commit meta, comments, check runs). It now reads the raw --format=%at epoch time and formats it with ago_seconds like everything else, so the wording is consistent across the site.

Assisted-by: Claude:claude-sonnet-5

Joseph D. Carpinelli · 1 month ago

Reviews

No reviews of this commit yet — record a verdict below.

Start a review

verdict

crates/git-ents-server/src/web/pages.rs @@ -56,10 +56,10 @@ auth: Option<&super::Auth>, ) -> Markup { let rel = &meta.rel; - let updated = git_output(repo, &["log", "-1", "--format=%ar"]) + let updated = git_output(repo, &["log", "-1", "--format=%at"]) .await - .map(|s| s.trim().to_owned()) - .filter(|s| !s.is_empty()); + .and_then(|s| s.trim().parse::<i64>().ok()) + .map(ago_seconds); let is_empty = updated.is_none(); let tree = root_tree(repo, !is_empty).await; let readme = readme(repo, &tree).await;