From 5f9d654939d388c7aeb8e84f6bb5b0d65319c535 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 21 Mar 2013 22:50:18 +0200 Subject: Dont show '0 additions and 0 deletions' message for commit --- app/models/commit.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index daba5414afa..4d0c57b35fd 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -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 -- cgit v1.2.1