diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-15 17:33:24 +0100 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-15 17:33:24 +0100 |
commit | 27400b0fce5d4ef3b7fd5ef4d25bac8f00754e33 (patch) | |
tree | b1e4df482d7c78e1d7fc56e862b7c266ba2b8e8b /templates/gititemlog.qtpl | |
parent | 4708ad8ffd96f3b457ff9d3a9660e7d0aa59a4b1 (diff) | |
download | cerrado-27400b0fce5d4ef3b7fd5ef4d25bac8f00754e33.tar.gz cerrado-27400b0fce5d4ef3b7fd5ef4d25bac8f00754e33.tar.bz2 cerrado-27400b0fce5d4ef3b7fd5ef4d25bac8f00754e33.zip |
feat: Add wrapper for commit
Add a wrapper to the commit log that also contains possible reference.
This will be useful once to later display the reference in the commit
log.
Diffstat (limited to 'templates/gititemlog.qtpl')
-rw-r--r-- | templates/gititemlog.qtpl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/gititemlog.qtpl b/templates/gititemlog.qtpl index b0c8cec..93efb24 100644 --- a/templates/gititemlog.qtpl +++ b/templates/gititemlog.qtpl @@ -1,8 +1,9 @@ +{% import "git.gabrielgio.me/cerrado/pkg/git" %} {% import "github.com/go-git/go-git/v5/plumbing/object" %} {% code type GitItemLogPage struct { - Commits []*object.Commit + Commits []*git.CommitReference Next *object.Commit } %} @@ -12,7 +13,7 @@ type GitItemLogPage struct { {% func (g *GitItemLogPage) GitContent(name, ref string) %} <div class="event-list"> {% for _, c := range g.Commits %} - {%= Commit(name, c, false) %} + {%= Commit(name, c.Commit(), false) %} {% endfor %} {% if g.Next != nil %} <a href="/{%s name %}/log/{%s ref %}/?from={%s g.Next.Hash.String() %}" class="btn btn-primary">Next</a> |