Sha256: 3c9f360d9a5d4e986f2be7e2aaeb74b7cf04950145f0db8ffb10e2c4c0839b36

Contents?: true

Size: 929 Bytes

Versions: 1

Compression:

Stored size: 929 Bytes

Contents

require 'r10k/git'
require 'r10k/git/ref'
require 'r10k/git/repository'


# head: A named reference to the commit at the tip of a branch. Heads are
# stored in a file in $GIT_DIR/refs/heads/ directory. except when using packed
#
# @deprecated This has been replaced by the ShellGit provider and the
#   StatefulRepository class and will be removed in 2.0.0
#
# @see https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html
# @api private
class R10K::Git::Head < R10K::Git::Ref

  # @!attribute [r] head
  #   @return [String] The git head
  attr_reader :head
  alias :ref :head

  def initialize(head, repository = nil)
    @head = head
    @repository = repository
  end

  # def sha1
  #   TODO ensure that @head is an actual head as opposed to a tag or other
  #   hooliganism.
  #end

  # If we are tracking a branch, we should always try to fetch a newer version
  # of that branch.
  def fetch?
    true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
r10k-1.5.1 lib/r10k/git/head.rb