summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-01-17 18:15:47 +0100
committerJacob Vosmaer <jacob@gitlab.com>2018-01-17 18:15:47 +0100
commit2fb3345072b1a3f58c8111357cedd4237e8efefb (patch)
treec762fc97b3c1df0e3c2d829247c111cc2204aa29
parent04edbb5fb34c219e5179e3a6f59584835ce9ef8f (diff)
downloadgitlab-ce-remove-rugged-walk.tar.gz
Remove Rugged::Walker from Repository#logremove-rugged-walk
-rw-r--r--lib/gitlab/git/repository.rb24
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index d0467bca992..e74b632890b 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)
@@ -1543,24 +1539,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.