Sha256: 43c5c50776d3f47610444604ef26f664dae773608bcc2ac12b10e318aaeb65fe

Contents?: true

Size: 731 Bytes

Versions: 9

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require 'avm/scms/branch'
require 'eac_ruby_utils/core_ext'

module Avm
  module Git
    module Scms
      class Git < ::Avm::Scms::Base
        class Branch < ::Avm::Scms::Branch
          common_constructor :scm, :eac_git_branch

          # @return [Avm::Git::Scms::Git::Commit]
          def head_commit
            ::Avm::Git::Scms::Git::Commit.new(scm, eac_git_branch.head_commit)
          end

          # @return [String]
          def id
            eac_git_branch.name
          end

          # @param remote [Avm::Git::Scms::Git::Remote]
          def push(remote)
            eac_git_branch.push(remote.eac_git_remote, force: true)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
avm-git-0.18.0 lib/avm/git/scms/git/branch.rb
eac_tools-0.94.0 sub/avm-git/lib/avm/git/scms/git/branch.rb
avm-git-0.17.0 lib/avm/git/scms/git/branch.rb
eac_tools-0.86.5 sub/avm-git/lib/avm/git/scms/git/branch.rb
avm-git-0.16.0 lib/avm/git/scms/git/branch.rb
eac_tools-0.86.4 sub/avm-git/lib/avm/git/scms/git/branch.rb
eac_tools-0.86.3 sub/avm-git/lib/avm/git/scms/git/branch.rb
avm-git-0.15.0 lib/avm/git/scms/git/branch.rb
eac_tools-0.86.2 sub/avm-git/lib/avm/git/scms/git/branch.rb