Author
|
zPlus <zplus@peers.community>
2022-08-05 05:23:23
|
Committer
|
zPlus <zplus@peers.community>
2022-08-05 05:23:23
|
Commit
|
9804d86
(patch)
|
Tree
|
8833e19
|
Parent(s)
|
|
Fix Log diffstats when commit has no parents.
Do not display diffstats in the Log page for commit with no parents
(first commit).
commits diff:
2071174..9804d86
2 files changed,
9 insertions,
3 deletions
—
download
Diffstat
Diff options
+6/-2
M templates/repository/log.html
72
|
72
|
|
{{ commit_time(commit.commit_time, commit.commit_time_offset)|ago }}
|
73
|
73
|
|
</td>
|
74
|
74
|
|
<td class="files">
|
75
|
|
- |
{{ diff[commit.short_id].stats.files_changed }}
|
|
75
|
+ |
{% if commit.short_id in diff %}
|
|
76
|
+ |
{{ diff[commit.short_id].stats.files_changed }}
|
|
77
|
+ |
{% endif %}
|
76
|
78
|
|
</td>
|
77
|
79
|
|
<td class="lines">
|
78
|
|
- |
<span class="deletions">-{{ diff[commit.short_id].stats.deletions }}</span>/<span class="insertions">+{{ diff[commit.short_id].stats.insertions }}</span>
|
|
80
|
+ |
{% if commit.short_id in diff %}
|
|
81
|
+ |
<span class="deletions">-{{ diff[commit.short_id].stats.deletions }}</span>/<span class="insertions">+{{ diff[commit.short_id].stats.insertions }}</span>
|
|
82
|
+ |
{% endif %}
|
79
|
83
|
|
</td>
|
80
|
84
|
|
</tr>
|
81
|
85
|
|
{% endfor %}
|
+3/-1
M web.py
505
|
505
|
|
break
|
506
|
506
|
|
|
507
|
507
|
|
commits.append(commit)
|
508
|
|
- |
diff[commit.short_id] = commit.parents[0].tree.diff_to_tree(commit.tree)
|
|
508
|
+ |
|
|
509
|
+ |
if len(commit.parents) > 0:
|
|
510
|
+ |
diff[commit.short_id] = commit.parents[0].tree.diff_to_tree(commit.tree)
|
509
|
511
|
|
|
510
|
512
|
|
return template(
|
511
|
513
|
|
'repository/log.html',
|