class Rfix::Branch::Name

Public Instance Methods

resolve() click to toggle source
# File lib/rfix/branch/name.rb, line 8
def resolve
  unless (branch = repository.branches[name])
    raise UnknownBranchError, branch
  end

  repository.lookup(repository.merge_base(branch.target_id, repository.head.target_id))
rescue Rugged::ReferenceError
  raise UnknownBranchError, name
end