Sha256: 7f0628cd41cc4eca1748f1a19eaaa29ba59d7faf6cf34285132e79ae6e42dd52
Contents?: true
Size: 546 Bytes
Versions: 9
Compression:
Stored size: 546 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.new("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.new("Could not find branch {{error:#{name}}}") end alias to_s name end end
Version data entries
9 entries across 9 versions & 1 rubygems