From b9bfb5a86e364838355c99402977fff38db24285 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sat, 8 Feb 2025 22:07:17 +0100 Subject: feat: Add time to commit logs --- templates/commit.qtpl.go | 108 ++++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 48 deletions(-) (limited to 'templates/commit.qtpl.go') diff --git a/templates/commit.qtpl.go b/templates/commit.qtpl.go index ea8f020..eeaa1f0 100644 --- a/templates/commit.qtpl.go +++ b/templates/commit.qtpl.go @@ -5,121 +5,133 @@ package templates //line templates/commit.qtpl:1 +import "git.gabrielgio.me/cerrado/pkg/humanize" + +//line templates/commit.qtpl:2 import "github.com/go-git/go-git/v5/plumbing/object" -//line templates/commit.qtpl:3 +//line templates/commit.qtpl:4 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line templates/commit.qtpl:3 +//line templates/commit.qtpl:4 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line templates/commit.qtpl:3 +//line templates/commit.qtpl:4 func StreamCommit(qw422016 *qt422016.Writer, name string, c *object.Commit, showTar bool) { -//line templates/commit.qtpl:3 +//line templates/commit.qtpl:4 qw422016.N().S(`
`)
-//line templates/commit.qtpl:19
+//line templates/commit.qtpl:21
 	qw422016.E().S(c.Message)
-//line templates/commit.qtpl:19
+//line templates/commit.qtpl:21
 	qw422016.N().S(`
`) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 } -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 func WriteCommit(qq422016 qtio422016.Writer, name string, c *object.Commit, showTar bool) { -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 qw422016 := qt422016.AcquireWriter(qq422016) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 StreamCommit(qw422016, name, c, showTar) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 qt422016.ReleaseWriter(qw422016) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 } -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 func Commit(name string, c *object.Commit, showTar bool) string { -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 qb422016 := qt422016.AcquireByteBuffer() -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 WriteCommit(qb422016, name, c, showTar) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 qs422016 := string(qb422016.B) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 qt422016.ReleaseByteBuffer(qb422016) -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 return qs422016 -//line templates/commit.qtpl:22 +//line templates/commit.qtpl:24 } -- cgit v1.2.3