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

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

Overview

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



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

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

#stateSymbol (readonly)

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

Returns:

  • (Symbol)

    one of :active, :unborn, or :detached



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

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