diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-30 12:19:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-30 12:19:05 +0300 |
commit | adc84bf8b44dfcfdcfa31287522a9d0ba845fe50 (patch) | |
tree | dbfdcb1b94d82dd718629c2fa3697a7e953b7935 | |
parent | 0c29cb3451414d21346894c140a17c53de6e1567 (diff) | |
parent | 31abf76840c5cb8f0713180e3ec39bd06428de1b (diff) | |
download | gitlab-ce-adc84bf8b44dfcfdcfa31287522a9d0ba845fe50.tar.gz |
Merge pull request #7906 from mr-vinn/fix-graph-log
Replace Gitlab::Git::GitStats
-rw-r--r-- | app/models/repository.rb | 14 |
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 |