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:
authorJonas Weber <github@jonasw.de>2016-05-20 23:23:08 +0300
committerJonas Weber <github@jonasw.de>2016-05-20 23:23:08 +0300
commit382e8cfef60d7bf1a96946ee902b25bc01d174ca (patch)
tree8d6a1b91b8c2fdc576e9bb92cf600829ad7fffc2 /lib/gitlab/graphs
parentc5a5d548426dbdc42812857e12adef3ac034f23b (diff)
Infinity Bug in Commit Statistics
fixes #1548
Diffstat (limited to 'lib/gitlab/graphs')
-rw-r--r--lib/gitlab/graphs/commits.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/graphs/commits.rb b/lib/gitlab/graphs/commits.rb
index 2122339d2db..3caf9036459 100644
--- a/lib/gitlab/graphs/commits.rb
+++ b/lib/gitlab/graphs/commits.rb
@@ -18,7 +18,7 @@ module Gitlab
end
def commit_per_day
- @commit_per_day ||= (@commits.size.to_f / @duration).round(1)
+ @commit_per_day ||= @commits.size / (@duration + 1)
end
def collect_data