home » zplus/clif.git
Author zPlus <zplus@peers.community> 2022-08-05 05:31:37
Committer zPlus <zplus@peers.community> 2022-08-05 05:31:37
Commit aa8d46a (patch)
Tree 1eaa260
Parent(s)

Log page: show diffstat for first commit.


commits diff: 9804d86..aa8d46a
1 file changed, 5 insertions, 2 deletionsdownload


Diffstat
-rw-r--r-- web.py 7

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+5/-2 M   web.py
index 4386480..772b5eb
old size: 25K - new size: 25K
@@ -506,8 +506,11 @@ def log(repository, revision):
506 506
507 507 commits.append(commit)
508 508
509 - if len(commit.parents) > 0:
510 - diff[commit.short_id] = commit.parents[0].tree.diff_to_tree(commit.tree)
509 + # Diff with parent tree, or empty tree if there's no parent
510 + diff[commit.short_id] = \
511 + commit.parents[0].tree.diff_to_tree(commit.tree) \
512 + if len(commit.parents) > 0 \
513 + else commit.tree.diff_to_tree(swap=True)
511 514
512 515 return template(
513 516 'repository/log.html',