summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2018-01-18 14:05:14 +0000
committerDouwe Maan <douwe@gitlab.com>2018-01-18 14:05:14 +0000
commitfa5203873105a8052847d117af839094e8f837db (patch)
treec9b42a562ea4a9e2153ac8226def198212fc1d94 /lib
parentee58763158ed10f12a8fe7c089257a532fe6e724 (diff)
downloadgitlab-ce-fa5203873105a8052847d117af839094e8f837db.tar.gz
Remove Rugged::Walker from Repository#log
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb27
1 files changed, 1 insertions, 26 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index c5d5c3a72c0..b89a38d187e 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -490,11 +490,7 @@ module Gitlab
return []
end
- if log_using_shell?(options)
- log_by_shell(sha, options)
- else
- log_by_walk(sha, options)
- end
+ log_by_shell(sha, options)
end
def count_commits(options)
@@ -1512,27 +1508,6 @@ module Gitlab
end
end
- def log_using_shell?(options)
- options[:path].present? ||
- options[:disable_walk] ||
- options[:skip_merges] ||
- options[:after] ||
- options[:before]
- end
-
- def log_by_walk(sha, options)
- walk_options = {
- show: sha,
- sort: Rugged::SORT_NONE,
- limit: options[:limit],
- offset: options[:offset]
- }
- Rugged::Walker.walk(rugged, walk_options).to_a
- end
-
- # Gitaly note: JV: although #log_by_shell shells out to Git I think the
- # complexity is such that we should migrate it as Ruby before trying to
- # do it in Go.
def log_by_shell(sha, options)
limit = options[:limit].to_i
offset = options[:offset].to_i