Class: R10K::Git::RemoteHead Private

Inherits:
Head
  • Object
show all
Defined in:
lib/r10k/git/remote_head.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Head

#head

Attributes inherited from Ref

#ref, #repository

Instance Method Summary collapse

Methods inherited from Head

#fetch?, #initialize

Methods inherited from Ref

#==, #fetch?, #initialize, #inspect, #resolvable?, #to_s

Constructor Details

This class inherits a constructor from R10K::Git::Head

Instance Method Details

#sha1Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
11
12
# File 'lib/r10k/git/remote_head.rb', line 6

def sha1
  if @repository.nil?
    raise ArgumentError, "Cannot resolve #{self.inspect}: no associated git repository"
  else
    @repository.resolve_head("refs/remotes/cache/#{@head}")
  end
end