1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
// Code generated by qtc from "commit.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line templates/commit.qtpl:1
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:4
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line templates/commit.qtpl:4
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line templates/commit.qtpl:4
func StreamCommit(qw422016 *qt422016.Writer, name string, c *object.Commit, showTar bool) {
//line templates/commit.qtpl:4
qw422016.N().S(`
<div class="row event">
<div class="row">
<div class="col-md">
<a title="`)
//line templates/commit.qtpl:8
qw422016.E().S(c.Hash.String())
//line templates/commit.qtpl:8
qw422016.N().S(`" href="/`)
//line templates/commit.qtpl:8
qw422016.E().S(name)
//line templates/commit.qtpl:8
qw422016.N().S(`/commit/`)
//line templates/commit.qtpl:8
qw422016.E().S(c.Hash.String())
//line templates/commit.qtpl:8
qw422016.N().S(`/">`)
//line templates/commit.qtpl:8
qw422016.E().S(c.Hash.String()[0:8])
//line templates/commit.qtpl:8
qw422016.N().S(`</a> —
<a title="`)
//line templates/commit.qtpl:9
qw422016.E().S(c.Committer.Email)
//line templates/commit.qtpl:9
qw422016.N().S(`" href="mailto:`)
//line templates/commit.qtpl:9
qw422016.E().S(c.Author.Email)
//line templates/commit.qtpl:9
qw422016.N().S(`">`)
//line templates/commit.qtpl:9
qw422016.E().S(c.Author.Name)
//line templates/commit.qtpl:9
qw422016.N().S(`</a>
</div>
`)
//line templates/commit.qtpl:11
if showTar {
//line templates/commit.qtpl:11
qw422016.N().S(`
<div class="col-md text-md-center">
<a title="tar.gz for `)
//line templates/commit.qtpl:13
qw422016.E().S(c.Hash.String())
//line templates/commit.qtpl:13
qw422016.N().S(`" href="/`)
//line templates/commit.qtpl:13
qw422016.E().S(name)
//line templates/commit.qtpl:13
qw422016.N().S(`/archive/`)
//line templates/commit.qtpl:13
qw422016.E().S(c.Hash.String())
//line templates/commit.qtpl:13
qw422016.N().S(`.tar.gz">tar.gz</a>
</div>
`)
//line templates/commit.qtpl:15
}
//line templates/commit.qtpl:15
qw422016.N().S(`
<div class="col-md text-md-end">
<a title="`)
//line templates/commit.qtpl:17
qw422016.E().S(c.Author.When.UTC().Format("2006-01-02 15:04:05"))
//line templates/commit.qtpl:17
qw422016.N().S(` UTC">`)
//line templates/commit.qtpl:17
qw422016.E().S(humanize.Time(c.Author.When))
//line templates/commit.qtpl:17
qw422016.N().S(`</a>
</div>
</div>
<div class="code-view">
<pre>`)
//line templates/commit.qtpl:21
qw422016.E().S(c.Message)
//line templates/commit.qtpl:21
qw422016.N().S(`</pre>
</div>
</div>
`)
//line templates/commit.qtpl:24
}
//line templates/commit.qtpl:24
func WriteCommit(qq422016 qtio422016.Writer, name string, c *object.Commit, showTar bool) {
//line templates/commit.qtpl:24
qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/commit.qtpl:24
StreamCommit(qw422016, name, c, showTar)
//line templates/commit.qtpl:24
qt422016.ReleaseWriter(qw422016)
//line templates/commit.qtpl:24
}
//line templates/commit.qtpl:24
func Commit(name string, c *object.Commit, showTar bool) string {
//line templates/commit.qtpl:24
qb422016 := qt422016.AcquireByteBuffer()
//line templates/commit.qtpl:24
WriteCommit(qb422016, name, c, showTar)
//line templates/commit.qtpl:24
qs422016 := string(qb422016.B)
//line templates/commit.qtpl:24
qt422016.ReleaseByteBuffer(qb422016)
//line templates/commit.qtpl:24
return qs422016
//line templates/commit.qtpl:24
}
|