From b9557015dadf3d3d2d3f50d26a67e14c59207fb5 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Tue, 20 May 2025 11:44:17 +0000 Subject: [PATCH] appview: use .Committer.When everywhere --- appview/state/repo.go | 4 ++-- appview/pages/templates/repo/branches.html | 4 ++-- appview/pages/templates/repo/commit.html | 2 +- appview/pages/templates/repo/empty.html | 2 +- appview/pages/templates/repo/index.html | 4 ++-- appview/pages/templates/repo/log.html | 4 ++-- 6 file(s) changed, 10 insertion(s)(+), 10 deletion(s)(-) diff --git a/appview/state/repo.go b/appview/state/repo.go --- a/appview/state/repo.go +++ b/appview/state/repo.go @@ -99,7 +99,7 @@ return 1 } if a.Commit != nil { - if a.Commit.Author.When.Before(b.Commit.Author.When) { + if a.Commit.Committer.When.Before(b.Commit.Committer.When) { return 1 } else { return -1 @@ -597,7 +597,7 @@ return 1 } if a.Commit != nil { - if a.Commit.Author.When.Before(b.Commit.Author.When) { + if a.Commit.Committer.When.Before(b.Commit.Committer.When) { return 1 } else { return -1 diff --git a/appview/pages/templates/repo/branches.html b/appview/pages/templates/repo/branches.html --- a/appview/pages/templates/repo/branches.html +++ b/appview/pages/templates/repo/branches.html @@ -59,7 +59,7 @@ {{ if .Commit }} - {{ .Commit.Author.When | timeFmt }} + {{ .Commit.Committer.When | timeFmt }} {{ end }} @@ -98,7 +98,7 @@
- {{ .Commit.Author.When | timeFmt }} + {{ .Commit.Committer.When | timeFmt }} {{ end }} diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -34,7 +34,7 @@ {{ $commit.Author.Name }} {{ end }} - {{ timeFmt $commit.Author.When }} + {{ timeFmt $commit.Committer.When }}

diff --git a/appview/pages/templates/repo/empty.html b/appview/pages/templates/repo/empty.html --- a/appview/pages/templates/repo/empty.html +++ b/appview/pages/templates/repo/empty.html @@ -17,7 +17,7 @@
{{ $br.Name }} - +
{{ end }} diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -237,7 +237,7 @@
- {{ timeFmt .Author.When }} + {{ timeFmt .Committer.When }} {{ $tagsForCommit := index $.TagMap .Hash.String }} {{ if gt (len $tagsForCommit) 0 }}
{{ if .Commit }} - + {{ end }} {{ if .IsDefault }} diff --git a/appview/pages/templates/repo/log.html b/appview/pages/templates/repo/log.html --- a/appview/pages/templates/repo/log.html +++ b/appview/pages/templates/repo/log.html @@ -71,7 +71,7 @@ {{ end }} - {{ timeFmt $commit.Author.When }} + {{ timeFmt $commit.Committer.When }} {{ end }} @@ -141,7 +141,7 @@
- {{ shortTimeFmt $commit.Author.When }} + {{ shortTimeFmt $commit.Committer.When }}
{{ end }} -- tangled.sh