Sha256: 25f7e701ff201cc740230fe2e414c389924041c2c4575b3c321a67db96795387

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

require "rfix/repository"
require "rfix/error"

module Rfix
  module Branch
    class UnknownBranchError < Rfix::Error
    end

    class NotYetImplementedError < Rfix::Error
    end
  end
end

Pathname(__dir__).glob("branches/*.rb").each(&method(:require))

module Rfix
  module Branch
    UPSTREAM = Branch::Upstream.new
    MAIN     = Branch::Main.new
    HEAD     = Branch::Head.new

    def self.local(at: Dir.pwd)
      repo(at: at).branches.each_name(:local).sort
    end

    def self.repo(at:)
      Rugged::Repository.new(at)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rfix-1.1.0.pre.150 lib/rfix/branch.rb
rfix-1.1.0.pre.149 lib/rfix/branch.rb
rfix-1.1.0.pre.147 lib/rfix/branch.rb