lib/rfix/branch.rb in rfix-1.4.1 vs lib/rfix/branch.rb in rfix-2.0.0
- old
+ new
@@ -1,31 +1,9 @@
-require "rfix/repository"
-require "rfix/error"
-autoload_rel "branches/*.rb"
+# frozen_string_literal: true
-module Rfix
- module Branch
- class UnknownBranchError < Rfix::Error
- end
+require "rugged"
- 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
+ # NOP
end
end