BigW Consortium Gitlab

Commit 5f9d6549 by 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?
%p.pull-right.cgray
This commit has This commit has
%span.cgreen #{@commit.stats.additions} additions %span.cgreen #{@commit.stats.additions} additions
and and
......
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