3 files changed,
11 insertions(+),
9 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-02-04 23:34:07 +0200
Authored at:
2026-02-04 22:06:08 +0200
Change ID:
ylovqmtxroutwlkutnyquxslnzxouvru
Parent:
3167cb3
M
internal/git/diff.go
路路路 27 27 type NiceDiff struct { 28 28 Diff []Diff 29 29 Commit struct { 30 - Message string 31 - Author object.Signature 32 - This string 33 - Parent string 30 + Commit 31 + This string 32 + Parent string 34 33 } 35 34 Stat struct { 36 35 FilesChanged int 路路路 57 56 58 57 nd := NiceDiff{} 59 58 nd.Commit.Message = c.Message 60 - nd.Commit.Author = c.Author 59 + nd.Commit.Hash = c.Hash.String() 60 + nd.Commit.HashShort = c.Hash.String()[:8] 61 + nd.Commit.AuthorEmail = c.Author.Email 62 + nd.Commit.AuthorName = c.Author.Name 61 63 nd.Commit.This = c.Hash.String() 62 64 nd.Commit.Parent = getParentHash(parent) 63 65 nd.Stat.FilesChanged = len(diffs)
M
web/templates/repo_commit.html
路路路 1 -{{ define "commit" }} 1 +{{ define "repo_commit" }} 2 2 <html> 3 3 <head> 4 4 {{ template "head" . }} 路路路 10 10 <section class="commit"> 11 11 <div class="box"> 12 12 <div class="commit-info"> 13 - <span class="commit-date">{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</span> 14 - {{ .commit.Author.Name }} <a href="mailto:{{ .commit.Author.Email }}" class="commit-email">{{ .commit.Author.Email }}</a> 13 + <span class="commit-date">{{ .commit.Committed }}</span> 14 + {{ .commit.AuthorName }} <a href="mailto:{{ .commit.AuthorEmail }}" class="commit-email">{{ .commit.AuthorEmail }}</a> 15 15 </div> 16 16 <pre class="commit-message">{{- .commit.Message -}}</pre> 17 17 </div>