Class: R10K::Git::Head Private
Overview
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.
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
Direct Known Subclasses
Instance Attribute Summary collapse
- #head ⇒ Object (also: #ref) readonly private
Attributes inherited from Ref
Instance Method Summary collapse
-
#fetch? ⇒ Boolean
private
If we are tracking a branch, we should always try to fetch a newer version of that branch.
-
#initialize(head, repository = nil) ⇒ Head
constructor
private
A new instance of Head.
Methods inherited from Ref
#==, #inspect, #resolvable?, #sha1, #to_s
Constructor Details
#initialize(head, repository = nil) ⇒ Head
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.
Returns a new instance of Head.
18 19 20 21 |
# File 'lib/r10k/git/head.rb', line 18 def initialize(head, repository = nil) @head = head @repository = repository end |
Instance Attribute Details
#head ⇒ Object (readonly) Also known as: ref
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.
15 16 17 |
# File 'lib/r10k/git/head.rb', line 15 def head @head end |
Instance Method Details
#fetch? ⇒ Boolean
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.
If we are tracking a branch, we should always try to fetch a newer version of that branch.
30 31 32 |
# File 'lib/r10k/git/head.rb', line 30 def fetch? true end |