Merge pull request #7906 from mr-vinn/fix-graph-log
Replace Gitlab::Git::GitStats
This commit is contained in:
commit
adc84bf8b4
1 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue