Sha256: 179eca9bb7e653997c13972c8b7f16fb532fcad077af23f9dad984a62d0e5b25
Contents?: true
Size: 538 Bytes
Versions: 6
Compression:
Stored size: 538 Bytes
Contents
require_relative "base" module Rfix class Branch::Name < Branch::Base attr_reader :name def initialize(name) @name = name end def resolve(with:) unless branch = with.branches[name] raise Branch::UnknownBranchError, "Could not find branch {{error:#{name}}}" end with.lookup(with.merge_base(branch.target_id, with.head.target_id)) rescue Rugged::ReferenceError raise Branch::UnknownBranchError, "Could not find branch {{error:#{name}}}" end alias to_s name end end
Version data entries
6 entries across 6 versions & 1 rubygems