Sha256: 5df35693de29fa85da4aba7df87915141a387440d4d4157d4b7ec964b7e871dd

Contents?: true

Size: 583 Bytes

Versions: 16

Compression:

Stored size: 583 Bytes

Contents

require "rfix/repository"
require "rfix/error"
autoload_rel "branches/*.rb"

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

16 entries across 16 versions & 1 rubygems

Version Path
rfix-1.4.1 lib/rfix/branch.rb
rfix-1.4.0.pre.201 lib/rfix/branch.rb
rfix-1.4.0 lib/rfix/branch.rb
rfix-1.3.0.pre.199 lib/rfix/branch.rb
rfix-1.2.6.pre.198 lib/rfix/branch.rb
rfix-1.2.6 lib/rfix/branch.rb
rfix-1.2.2.pre.174 lib/rfix/branch.rb
rfix-1.2.5 lib/rfix/branch.rb
rfix-1.2.4 lib/rfix/branch.rb
rfix-1.2.3.pre lib/rfix/branch.rb
rfix-1.2.2.pre lib/rfix/branch.rb
rfix-1.2.2.pre.172 lib/rfix/branch.rb
rfix-1.2.2 lib/rfix/branch.rb
rfix-1.2.0 lib/rfix/branch.rb
rfix-1.1.4.pre lib/rfix/branch.rb
rfix-1.1.1.pre lib/rfix/branch.rb