2017-01-04 18:43:06 +00:00
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
class Branch < Ref
|
2018-01-30 10:22:08 +00:00
|
|
|
def self.find(repo, branch_name)
|
|
|
|
if branch_name.is_a?(Gitlab::Git::Branch)
|
|
|
|
branch_name
|
|
|
|
else
|
|
|
|
repo.find_branch(branch_name)
|
2017-10-27 15:55:08 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-07-14 13:30:58 +00:00
|
|
|
def initialize(repository, name, target, target_commit)
|
|
|
|
super(repository, name, target, target_commit)
|
2017-03-17 19:36:46 +00:00
|
|
|
end
|
2017-01-04 18:43:06 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|