From 051146154ae165d5b40c4b4fcaf9531871ae6a27 Mon Sep 17 00:00:00 2001 From: zPlus Date: Tue, 9 Aug 2022 11:14:54 +0200 Subject: [PATCH] Fix division by zero error in diffstat histogram. Do not compute histogram when there are a total of zero insertions and deletions. --- templates/repository/commit.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/repository/commit.html b/templates/repository/commit.html index 6f3d68e..4d15658 100644 --- a/templates/repository/commit.html +++ b/templates/repository/commit.html @@ -74,8 +74,10 @@ {{ patch.delta.new_file.path }} {{ patch.line_stats[1] + patch.line_stats[2] }} - + {% if diff_stats.insertions + diff_stats.deletions > 0 %} + + {% endif %}