all repos

mugit @ 1d546b3

🐮 git server that your cow will love
3 files changed, 11 insertions(+), 9 deletions(-)
git: dont expose internal go-git types
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-02-04 23:34:07 +0200
Change ID: ylovqmtxroutwlkutnyquxslnzxouvru
Parent: 3167cb3
M internal/git/diff.go

@@ -27,10 +27,9 @@

type NiceDiff struct { Diff []Diff Commit struct { - Message string - Author object.Signature - This string - Parent string + Commit + This string + Parent string } Stat struct { FilesChanged int

@@ -57,7 +56,10 @@ }

nd := NiceDiff{} nd.Commit.Message = c.Message - nd.Commit.Author = c.Author + nd.Commit.Hash = c.Hash.String() + nd.Commit.HashShort = c.Hash.String()[:8] + nd.Commit.AuthorEmail = c.Author.Email + nd.Commit.AuthorName = c.Author.Name nd.Commit.This = c.Hash.String() nd.Commit.Parent = getParentHash(parent) nd.Stat.FilesChanged = len(diffs)
M internal/handlers/repo.go

@@ -277,7 +277,7 @@ data["commit"] = diff.Commit

data["name"] = name data["ref"] = ref data["desc"] = desc - h.templ(w, "commit", data) + h.templ(w, "repo_commit", data) } func (h *handlers) refsHandler(w http.ResponseWriter, r *http.Request) {
M web/templates/repo_commit.html

@@ -1,4 +1,4 @@

-{{ define "commit" }} +{{ define "repo_commit" }} <html> <head> {{ template "head" . }}

@@ -10,8 +10,8 @@ <main>

<section class="commit"> <div class="box"> <div class="commit-info"> - <span class="commit-date">{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</span> - {{ .commit.Author.Name }} <a href="mailto:{{ .commit.Author.Email }}" class="commit-email">{{ .commit.Author.Email }}</a> + <span class="commit-date">{{ .commit.Committed }}</span> + {{ .commit.AuthorName }} <a href="mailto:{{ .commit.AuthorEmail }}" class="commit-email">{{ .commit.AuthorEmail }}</a> </div> <pre class="commit-message">{{- .commit.Message -}}</pre> </div>