Sorted out diffs so that diffing against parents, diffing merges and other such vecto...
[catagits/Gitalist.git] / templates / commit.tt2
CommitLineData
c8870bd3 1[% INCLUDE 'commit-nav.tt2' object = commit %]
2247133f 2
b3ad9e63 3<div class='commit-message'>
47495599 4[% commit.comment.substr(0, 85) %] ...
790ce598 5[% FOREACH ref IN branches_on %]
ad8884fc 6 <span class='refs'><a href='/shortlog?p=[% project %];h=[% commit.sha1 %];hb=[% ref %]'>[% ref %]</a></span>
1ef8dc7d 7[% END %]
8</div>
9
b3ad9e63 10<dl class='commit-info'>
1ef8dc7d 11 <dt>author</dt>
2247133f 12 <dd>[% commit.author.name | html %] &lt;[% commit.author.email %]&gt;<br/>
1ef8dc7d 13 [% commit.authored_time %]</dd>
14 <dt>committer</dt>
15 <dd>[% commit.committer.name %] &lt;[% commit.committer.email %]&gt;<br/>
16 [% commit.committed_time %]</dd>
17 <dt>commit</dt>
18 <dd>[% commit.sha1 %]</dd>
19 <dt>tree</dt>
ad8884fc 20 <dd>[% commit.tree_sha1 %] <a href="/tree?p=[% project %];h=[% commit.sha1 %];hb=[% commit.tree_sha1 %]">tree</a></dd>
1ef8dc7d 21 [% FOREACH parent IN commit.parents %]
22 <dt>parent</dt>
ad8884fc 23 <dd>[% parent %]
24 <span class='action-list'>
25 <a href="/commit?p=[% project %];h=[% parent %]">commit</a>
26 <a href="/commitdiff?p=[% project %];h=[% commit.sha1 %];hp=[% parent %]">diff</a>
27 </span>
28 </dd>
1ef8dc7d 29 [% END %]
30</dl>
31
c8870bd3 32<pre class='commit-message'>[% commit.comment %]</pre>
b3ad9e63 33
ad8884fc 34[%
35# In the case of merge commits there will be no diff tree.
36IF diff_tree.size > 0;
37 INCLUDE '_diff_tree.tt2';
38END;
39%]
b3ad9e63 40
1ef8dc7d 41<!--
42
43$Git_PurePerl_Object_Commit1 = bless( {
44 author => bless( {
45 email => 'broq@cpan.org',
46 name => 'broquaint'
47 }, 'Git::PurePerl::Actor' ),
48 authored_time
49 => {
50 DateTime
51 },
52 comment => 'The blob action now has simple (but functioning) syntax highlighting (thanks to jrockway\'s Angerwhale for the highlighting code).',
53 committed_time
54 => {
55 DateTime
56 },
57 committer
58 => bless( {
59 email => 'broq@cpan.org',
60 name => 'broquaint'
61 }, 'Git::PurePerl::Actor' ),
62 content => "tree 278387038d3a42dcc9b3b33d6809c71371caee90\nparent b222ff0a7260cc1777c".
63 "7e455dfcaf22551a512fc\nauthor broquaint <broq\@cpan.org> 1256204829 +0100\n".
64 "committer broquaint <broq\@cpan.org> 1256204829 +0100\n\nThe blob action no".
65 "w has simple (but functioning) syntax highlighting (thanks to jrockway's".
66 " Angerwhale for the highlighting code).\n",
67 git => bless( {
68 directory => {
69 dirs => [ '.' ],
70 file_spec_class
71 => undef,
72 volume => ''
73 },
74 gitdir => {
75 dirs => [ '.git' ],
76 file_spec_class
77 => undef,
78 volume => ''
79 },
80 loose => bless( { directory => {
81 dirs => [
82 '.git',
83 'objects'
84 ],
85 file_spec_class
86 => undef,
87 volume => ''
88 } }, 'Git::PurePerl::Loose' ),
89 packs => [ bless( {
90 fh => bless( do{ require Symbol; Symbol::gensym }, 'IO::File' ),
91 filename
92 => {
93 dir => {
94 dirs => [
95 '.git',
96 'objects',
97 'pack'
98 ],
99 file_spec_class
100 => undef,
101 volume => ''
102 },
103 file => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.pack',
104 file_spec_class
105 => undef
106 },
107 index => bless( {
108 fh => bless( Symbol::gensym, 'IO::File' ),
109 filename => {
110 dir => {
111 dirs => [
112 '.git',
113 'objects',
114 'pack'
115 ],
116 file_spec_class
117 => undef,
118 volume => ''
119 },
120 file => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.idx',
121 file_spec_class
122 => undef
123 },
124 offsets => [
125 ( 0 ) x 23,
126 ( 1 ) x 29,
127 ( 2 ) x 11,
128 ( 3 ) x 6,
129 ( 4 ) x 22,
130 ( 5 ) x 51,
131 ( 6 ) x 78,
132 ( 7 ) x 3,
133 ( 8 ) x 34
134 ],
135 size => 8
136 }, 'Git::PurePerl::PackIndex::Version2' ),
137 index_filename
138 => {
139 dir => {
140 dirs => [
141 '.git',
142 'objects',
143 'pack'
144 ],
145 file_spec_class
146 => undef,
147 volume => ''
148 },
149 file => 'pack-76da0c32a0a4918d1828d110636caad32af6ec6c.idx',
150 file_spec_class
151 => undef
152 }
153 }, 'Git::PurePerl::Pack::WithIndex' ) ]
154 }, 'Git::PurePerl' ),
155 kind => 'commit',
156 parent_sha1
157 => 'b222ff0a7260cc1777c7e455dfcaf22551a512fc',
158 parents => [ 'b222ff0a7260cc1777c7e455dfcaf22551a512fc' ],
159 sha1 => '7e54e579e196c6c545fee1030175f65a111039d4',
160 size => 328,
161 tree_sha1
162 => '278387038d3a42dcc9b3b33d6809c71371caee90'
163 }, 'Git::PurePerl::Object::Commit' );
164$Git_PurePerl_Object_Commit1->{committed_time}{locale} = $Git_PurePerl_Object_Commit1->{authored_time}{locale};
165bless( $Git_PurePerl_Object_Commit1->{authored_time}, 'DateTime' );
166bless( $Git_PurePerl_Object_Commit1->{committed_time}, 'DateTime' );
167bless( $Git_PurePerl_Object_Commit1->{git}{directory}, 'Path::Class::Dir' );
168bless( $Git_PurePerl_Object_Commit1->{git}{gitdir}, 'Path::Class::Dir' );
169bless( $Git_PurePerl_Object_Commit1->{git}{loose}{directory}, 'Path::Class::Dir' );
170bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{filename}{dir}, 'Path::Class::Dir' );
171bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{filename}, 'Path::Class::File' );
172bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index}{filename}{dir}, 'Path::Class::Dir' );
173bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index}{filename}, 'Path::Class::File' );
174bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index_filename}{dir}, 'Path::Class::Dir' );
175bless( $Git_PurePerl_Object_Commit1->{git}{packs}[0]{index_filename}, 'Path::Class::File' );
176-->