Class: Git::Repository::Branching::HeadState Private

Inherits:
Data
  • Object
show all
Defined in:
lib/git/repository/branching.rb

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.

Represents the state of HEAD in a repository

Instance Attribute Summary collapse

Instance Attribute Details

#nameString (readonly)

Returns the branch name, or 'HEAD' when detached.

Returns:

  • (String)

    the branch name, or 'HEAD' when detached



40
# File 'lib/git/repository/branching.rb', line 40

HeadState = Data.define(:state, :name)

#stateSymbol (readonly)

Returns one of :active, :unborn, or :detached.

Returns:

  • (Symbol)

    one of :active, :unborn, or :detached



40
# File 'lib/git/repository/branching.rb', line 40

HeadState = Data.define(:state, :name)