Commit 5f9d6549 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont show '0 additions and 0 deletions' message for commit

parent ad5ea142
......@@ -172,4 +172,10 @@ class Commit
lines.pop if lines.last == "-- " # end of diff
lines.join("\n")
end
def has_zero_stats?
stats.total.zero?
rescue
true
end
end
= render "commit_box"
%p.pull-right.cgray
This commit has
%span.cgreen #{@commit.stats.additions} additions
and
%span.cred #{@commit.stats.deletions} deletions
- unless @commit.has_zero_stats?
%p.pull-right.cgray
This commit has
%span.cgreen #{@commit.stats.additions} additions
and
%span.cred #{@commit.stats.deletions} deletions
= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment