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:
Diffstat (limited to 'lib/gitlab/git/commit_stats.rb')
-rw-r--r--lib/gitlab/git/commit_stats.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/gitlab/git/commit_stats.rb b/lib/gitlab/git/commit_stats.rb
index 8463b1eb794..ae6f554bc06 100644
--- a/lib/gitlab/git/commit_stats.rb
+++ b/lib/gitlab/git/commit_stats.rb
@@ -1,5 +1,3 @@
-# Gitaly note: JV: 1 RPC, migration in progress.
-
# Gitlab::Git::CommitStats counts the additions, deletions, and total changes
# in a commit.
module Gitlab
@@ -16,12 +14,8 @@ module Gitlab
@deletions = 0
@total = 0
- repo.gitaly_migrate(:commit_stats) do |is_enabled|
- if is_enabled
- gitaly_stats(repo, commit)
- else
- rugged_stats(commit)
- end
+ repo.wrapped_gitaly_errors do
+ gitaly_stats(repo, commit)
end
end
@@ -31,12 +25,6 @@ module Gitlab
@deletions = stats.deletions
@total = @additions + @deletions
end
-
- def rugged_stats(commit)
- diff = commit.rugged_diff_from_parent
- _files_changed, @additions, @deletions = diff.stat
- @total = @additions + @deletions
- end
end
end
end