summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-09-30 12:16:27 +0200
committerMarin Jankovski <maxlazio@gmail.com>2014-09-30 12:16:27 +0200
commit7d45d8a14e25d752b8763736bb2b9efba033da55 (patch)
treeee5651947875b80ad8603b55def83eceeb8409ac
parentbe34477d68240abd5e62c50fec4cdca593d92489 (diff)
parentadc84bf8b44dfcfdcfa31287522a9d0ba845fe50 (diff)
downloadgitlab-ce-7d45d8a14e25d752b8763736bb2b9efba033da55.tar.gz
Merge branch 'master' of github.com:gitlabhq/gitlabhq
-rw-r--r--app/models/repository.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 082086d8e5a..339e485e6d2 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -137,8 +137,18 @@ class Repository
def graph_log
Rails.cache.fetch(cache_key(:graph_log)) do
- stats = Gitlab::Git::GitStats.new(raw_repository, root_ref, Gitlab.config.git.timeout)
- stats.parsed_log
+ commits = raw_repository.log(limit: 6000, skip_merges: true,
+ ref: root_ref)
+ commits.map do |rugged_commit|
+ commit = Gitlab::Git::Commit.new(rugged_commit)
+
+ {
+ author_name: commit.author_name.force_encoding('UTF-8'),
+ author_email: commit.author_email.force_encoding('UTF-8'),
+ additions: commit.stats.additions,
+ deletions: commit.stats.deletions
+ }
+ end
end
end