diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-17 09:56:10 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-01-17 09:56:10 +0000 |
commit | 9b8f51c9d97f7301f236189d262ce253ff612da6 (patch) | |
tree | b93ee010de4b03a086742b88e10975d3a76fa6b8 /lib | |
parent | e6ddb2ee152e9a7c81c4d378f58a570ba4453606 (diff) | |
parent | f4de7309aba24897d2f6693ad9a93d8d2a40f5d7 (diff) | |
download | gitlab-ce-9b8f51c9d97f7301f236189d262ce253ff612da6.tar.gz |
Merge branch 'remove-branch-names-contains' into 'master'
Remove unused methods from Gitlab::Git
See merge request gitlab-org/gitlab-ce!16494
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d0467bca992..c5d5c3a72c0 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -621,37 +621,6 @@ module Gitlab end end - # Returns branch names collection that contains the special commit(SHA1 - # or name) - # - # Ex. - # repo.branch_names_contains('master') - # - def branch_names_contains(commit) - branches_contains(commit).map { |c| c.name } - 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 |