51
|
51
|
|
{% endfor %}
|
52
|
52
|
|
</td>
|
53
|
53
|
|
</tr>
|
54
|
|
- |
<tr>
|
55
|
|
- |
<td>
|
56
|
|
- |
<b>±</b>
|
57
|
|
- |
</td>
|
58
|
|
- |
<td>
|
59
|
|
- |
{{ diff.stats.files_changed }} files changed,
|
60
|
|
- |
{{ diff.stats.insertions }} insertions,
|
61
|
|
- |
{{ diff.stats.deletions }} deletions
|
62
|
|
- |
</td>
|
63
|
|
- |
</tr>
|
64
|
54
|
|
</tbody>
|
65
|
55
|
|
</table>
|
66
|
56
|
|
|
|
57
|
+ |
<br />
|
|
58
|
+ |
|
67
|
59
|
|
<div class="message">{{ commit.message }}</div>
|
68
|
60
|
|
|
69
|
|
- |
<div>
|
70
|
|
- |
<details>
|
71
|
|
- |
<summary>Diff options</summary>
|
72
|
|
- |
<form action="" method="get">
|
73
|
|
- |
<table>
|
74
|
|
- |
<tr>
|
75
|
|
- |
<td>
|
76
|
|
- |
View
|
77
|
|
- |
</td>
|
78
|
|
- |
<td>
|
79
|
|
- |
<label><input type="radio" name="mode" value="udiff" {{ 'checked' if mode == 'udiff' }}>Unified</label>
|
80
|
|
- |
<label><input type="radio" name="mode" value="ssdiff" {{ 'checked' if mode == 'ssdiff' }}>Side by side</label>
|
81
|
|
- |
</td>
|
82
|
|
- |
</tr>
|
83
|
|
- |
<tr>
|
84
|
|
- |
<td>
|
85
|
|
- |
Context lines
|
86
|
|
- |
</td>
|
87
|
|
- |
<td>
|
88
|
|
- |
<input type="number" min=0 max=1000 name="context_lines" value="{{ context_lines }}" />
|
89
|
|
- |
</td>
|
90
|
|
- |
</tr>
|
91
|
|
- |
<tr>
|
92
|
|
- |
<td>
|
93
|
|
- |
Inter-hunk lines
|
94
|
|
- |
</td>
|
95
|
|
- |
<td>
|
96
|
|
- |
<input type="number" min=0 max=1000 name="inter_hunk_lines" value="{{ inter_hunk_lines }}" />
|
97
|
|
- |
</td>
|
98
|
|
- |
</tr>
|
99
|
|
- |
<tr>
|
100
|
|
- |
<td>
|
101
|
|
- |
Side
|
102
|
|
- |
</td>
|
103
|
|
- |
<td>
|
104
|
|
- |
<label><input type="radio" name="side" value="normal" {{ 'checked' if side == 'normal' }}>Normal</label>
|
105
|
|
- |
<label><input type="radio" name="side" value="reverse" {{ 'checked' if side == 'reverse' }}>Reverse</label>
|
106
|
|
- |
</td>
|
107
|
|
- |
</tr>
|
108
|
|
- |
<tr>
|
109
|
|
- |
<td>
|
110
|
|
- |
Whitespace
|
111
|
|
- |
</td>
|
112
|
|
- |
<td>
|
113
|
|
- |
<label><input type="radio" name="whitespace" value="include" {{ 'checked' if whitespace == 'include' }}>Include</label>
|
114
|
|
- |
<label><input type="radio" name="whitespace" value="ignore_all" {{ 'checked' if whitespace == 'ignore_all' }}>Ignore all</label>
|
115
|
|
- |
<label><input type="radio" name="whitespace" value="ignore_change" {{ 'checked' if whitespace == 'ignore_change' }}>Ignore amount changes</label>
|
116
|
|
- |
<label><input type="radio" name="whitespace" value="ignore_eol" {{ 'checked' if whitespace == 'ignore_eol' }}>Ignore at end of line</label>
|
117
|
|
- |
</td>
|
118
|
|
- |
</tr>
|
119
|
|
- |
</table>
|
120
|
|
- |
<input type="submit" value="Update" />
|
121
|
|
- |
</form>
|
122
|
|
- |
</details>
|
123
|
|
- |
</div>
|
|
61
|
+ |
<br /><br /><br /><br />
|
|
62
|
+ |
|
|
63
|
+ |
<details class="diffstat" open>
|
|
64
|
+ |
{# pygit2 appears to recompute all the stats every time we use diff.stats,
|
|
65
|
+ |
# therefore we set this variable in order to compute it only once.
|
|
66
|
+ |
#}
|
|
67
|
+ |
{% set diff_stats = diff.stats %}
|
|
68
|
+ |
|
|
69
|
+ |
<summary>Diffstat</summary>
|
|
70
|
+ |
<table>
|
|
71
|
+ |
{% for patch in diff %}
|
|
72
|
+ |
<tr>
|
|
73
|
+ |
<td class="filemode">{{ patch.delta.new_file.mode|filemode }}</td>
|
|
74
|
+ |
<td class="path">{{ patch.delta.new_file.path }}</td>
|
|
75
|
+ |
<td class="lines">{{ patch.line_stats[1] + patch.line_stats[2] }}</td>
|
|
76
|
+ |
<td class="histogram">
|
|
77
|
+ |
<span title="+{{ patch.line_stats[1] }}" class="insertions" style="width:{{ patch.line_stats[1] / (diff_stats.insertions + diff_stats.deletions) * 100 }}%"></span
|
|
78
|
+ |
><span title="-{{ patch.line_stats[2] }}" class="deletions" style="width:{{ patch.line_stats[2] / (diff_stats.insertions + diff_stats.deletions) * 100 }}%"></span>
|
|
79
|
+ |
</td>
|
|
80
|
+ |
<td></td>
|
|
81
|
+ |
</tr>
|
|
82
|
+ |
{% endfor %}
|
|
83
|
+ |
</table>
|
|
84
|
+ |
|
|
85
|
+ |
<div class="accumulated">
|
|
86
|
+ |
<b>{{ diff_stats.files_changed }}</b> file{{ 's' if diff_stats.files_changed != 1 }} changed,
|
|
87
|
+ |
<span class="insertions"><b>{{ diff_stats.insertions }}</b> insertion{{ 's' if diff_stats.insertions != 1 }}</span>,
|
|
88
|
+ |
<span class="deletions"><b>{{ diff_stats.deletions }}</b> deletion{{ 's' if diff_stats.deletions != 1 }}</span>
|
|
89
|
+ |
</div>
|
|
90
|
+ |
</details>
|
|
91
|
+ |
|
|
92
|
+ |
<br />
|
|
93
|
+ |
|
|
94
|
+ |
<details class="diff_options">
|
|
95
|
+ |
<summary>Diff options</summary>
|
|
96
|
+ |
<form action="" method="get">
|
|
97
|
+ |
<table>
|
|
98
|
+ |
<tr>
|
|
99
|
+ |
<td>
|
|
100
|
+ |
View
|
|
101
|
+ |
</td>
|
|
102
|
+ |
<td>
|
|
103
|
+ |
<label><input type="radio" name="mode" value="udiff" {{ 'checked' if mode == 'udiff' }}>Unified</label>
|
|
104
|
+ |
<label><input type="radio" name="mode" value="ssdiff" {{ 'checked' if mode == 'ssdiff' }}>Side by side</label>
|
|
105
|
+ |
</td>
|
|
106
|
+ |
</tr>
|
|
107
|
+ |
<tr>
|
|
108
|
+ |
<td>
|
|
109
|
+ |
Context lines
|
|
110
|
+ |
</td>
|
|
111
|
+ |
<td>
|
|
112
|
+ |
<input type="number" min=0 max=1000 name="context_lines" value="{{ context_lines }}" />
|
|
113
|
+ |
</td>
|
|
114
|
+ |
</tr>
|
|
115
|
+ |
<tr>
|
|
116
|
+ |
<td>
|
|
117
|
+ |
Inter-hunk lines
|
|
118
|
+ |
</td>
|
|
119
|
+ |
<td>
|
|
120
|
+ |
<input type="number" min=0 max=1000 name="inter_hunk_lines" value="{{ inter_hunk_lines }}" />
|
|
121
|
+ |
</td>
|
|
122
|
+ |
</tr>
|
|
123
|
+ |
<tr>
|
|
124
|
+ |
<td>
|
|
125
|
+ |
Side
|
|
126
|
+ |
</td>
|
|
127
|
+ |
<td>
|
|
128
|
+ |
<label><input type="radio" name="side" value="normal" {{ 'checked' if side == 'normal' }}>Normal</label>
|
|
129
|
+ |
<label><input type="radio" name="side" value="reverse" {{ 'checked' if side == 'reverse' }}>Reverse</label>
|
|
130
|
+ |
</td>
|
|
131
|
+ |
</tr>
|
|
132
|
+ |
<tr>
|
|
133
|
+ |
<td>
|
|
134
|
+ |
Whitespace
|
|
135
|
+ |
</td>
|
|
136
|
+ |
<td>
|
|
137
|
+ |
<label><input type="radio" name="whitespace" value="include" {{ 'checked' if whitespace == 'include' }}>Include</label>
|
|
138
|
+ |
<label><input type="radio" name="whitespace" value="ignore_all" {{ 'checked' if whitespace == 'ignore_all' }}>Ignore all</label>
|
|
139
|
+ |
<label><input type="radio" name="whitespace" value="ignore_change" {{ 'checked' if whitespace == 'ignore_change' }}>Ignore amount changes</label>
|
|
140
|
+ |
<label><input type="radio" name="whitespace" value="ignore_eol" {{ 'checked' if whitespace == 'ignore_eol' }}>Ignore at end of line</label>
|
|
141
|
+ |
</td>
|
|
142
|
+ |
</tr>
|
|
143
|
+ |
</table>
|
|
144
|
+ |
<input type="submit" value="Update" />
|
|
145
|
+ |
</form>
|
|
146
|
+ |
</details>
|
124
|
147
|
|
|
125
|
148
|
|
{% for patch in diff %}
|
126
|
149
|
|
|
139
|
162
|
|
<thead>
|
140
|
163
|
|
<tr>
|
141
|
164
|
|
<td colspan="4">
|
142
|
|
- |
-{{ patch.line_stats[2] }}/+{{ patch.line_stats[1] }}
|
|
165
|
+ |
{% if patch.line_stats[1] + patch.line_stats[2] > 0 %}
|
|
166
|
+ |
{% set color_border = patch.line_stats[1] / ( patch.line_stats[1] + patch.line_stats[2] ) * 100 %}
|
|
167
|
+ |
{% else %}
|
|
168
|
+ |
{% set color_border = 0 %}
|
|
169
|
+ |
{% endif %}
|
|
170
|
+ |
|
|
171
|
+ |
<span class="histogram" style="border-image: linear-gradient(to right, lightgreen {{ color_border }}%, red {{ color_border }}%) 1;">
|
|
172
|
+ |
+{{ patch.line_stats[1] }}/-{{ patch.line_stats[2] }}
|
|
173
|
+ |
</span>
|
143
|
174
|
|
|
144
|
175
|
|
{% if patch.delta.status == 1 %}
|
145
|
176
|
|
<b title="Added">A</b> {{ patch.delta.new_file.path }}
|