Skip to content
Snippets Groups Projects
Commit 5f9d6549 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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

parent ad5ea142
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment