summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-01-16 15:20:21 +0100
committerJacob Vosmaer <jacob@gitlab.com>2018-01-16 15:20:21 +0100
commit965a92451eedc28e6b8c60b7865c8e350ba909e1 (patch)
treef8bde9b2e2600a0c5a52eafb20e2761a0a6e267f
parentb4de7a49b4748664fa29b05d0c1a6071ab53893f (diff)
downloadgitlab-ce-remove-branch-names-contains.tar.gz
Remove another unused methodremove-branch-names-contains
-rw-r--r--lib/gitlab/git/repository.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 2f7a0f6f792..c5d5c3a72c0 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -621,27 +621,6 @@ module Gitlab
end
end
- # Returns branch collection that contains the special commit(SHA1 or name)
- #
- # Ex.
- # repo.branch_names_contains('master')
- #
- def branches_contains(commit)
- commit_obj = rugged.rev_parse(commit)
- parent = commit_obj.parents.first unless commit_obj.parents.empty?
-
- walker = Rugged::Walker.new(rugged)
-
- rugged.branches.select do |branch|
- walker.push(branch.target_id)
- walker.hide(parent) if parent
- result = walker.any? { |c| c.oid == commit_obj.oid }
- walker.reset
-
- result
- end
- end
-
# Get refs hash which key is SHA1
# and value is a Rugged::Reference
def refs_hash