Commit 5f9d654939d388c7aeb8e84f6bb5b0d65319c535
1 parent
ad5ea142
Exists in
master
and in
4 other branches
Dont show '0 additions and 0 deletions' message for commit
Showing
2 changed files
with
12 additions
and
5 deletions
Show diff stats
app/models/commit.rb
app/views/commit/show.html.haml
| 1 | 1 | = render "commit_box" |
| 2 | 2 | |
| 3 | -%p.pull-right.cgray | |
| 4 | - This commit has | |
| 5 | - %span.cgreen #{@commit.stats.additions} additions | |
| 6 | - and | |
| 7 | - %span.cred #{@commit.stats.deletions} deletions | |
| 3 | +- unless @commit.has_zero_stats? | |
| 4 | + %p.pull-right.cgray | |
| 5 | + This commit has | |
| 6 | + %span.cgreen #{@commit.stats.additions} additions | |
| 7 | + and | |
| 8 | + %span.cred #{@commit.stats.deletions} deletions | |
| 8 | 9 | |
| 9 | 10 | = render "commits/diffs", diffs: @commit.diffs |
| 10 | 11 | = render "notes/notes_with_form" | ... | ... |