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 ...@@ -172,4 +172,10 @@ class Commit
lines.pop if lines.last == "-- " # end of diff lines.pop if lines.last == "-- " # end of diff
lines.join("\n") lines.join("\n")
end end
def has_zero_stats?
stats.total.zero?
rescue
true
end
end end
= render "commit_box" = render "commit_box"
%p.pull-right.cgray - unless @commit.has_zero_stats?
This commit has %p.pull-right.cgray
%span.cgreen #{@commit.stats.additions} additions This commit has
and %span.cgreen #{@commit.stats.additions} additions
%span.cred #{@commit.stats.deletions} deletions and
%span.cred #{@commit.stats.deletions} deletions
= render "commits/diffs", diffs: @commit.diffs = render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form" = 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