gitlab-org--gitlab-foss/lib/gitlab/git/branch.rb

24 lines
562 B
Ruby
Raw Normal View History

2017-01-04 13:43:06 -05:00
module Gitlab
module Git
class Branch < Ref
class << self
def find(repo, branch_name)
if branch_name.is_a?(Gitlab::Git::Branch)
branch_name
else
repo.find_branch(branch_name)
end
end
def names_contains_sha(repo, sha, limit: 0)
GitalyClient::RefService.new(repo).branch_names_contains_sha(sha)
2017-10-27 11:55:08 -04:00
end
end
2017-07-14 09:30:58 -04:00
def initialize(repository, name, target, target_commit)
super(repository, name, target, target_commit)
end
2017-01-04 13:43:06 -05:00
end
end
end