Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-22 00:50:18 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-22 00:50:18 +0400
commit5f9d654939d388c7aeb8e84f6bb5b0d65319c535 (patch)
treec937a5ca3e314d86f6fd7c8ad3e4a4a968b7344f /app/models/commit.rb
parentad5ea14210cc6dcb674c421e296b67ed2d0e6dbc (diff)
Dont show '0 additions and 0 deletions' message for commit
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb6
1 files changed, 6 insertions, 0 deletions
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