Method: Pkg::Util::Git.branch_name

Defined in:
lib/packaging/util/git.rb

.branch_nameObject

Return the name of the current branch



131
132
133
134
135
136
# File 'lib/packaging/util/git.rb', line 131

def branch_name
  Pkg::Util.in_project_root do
    stdout, = Pkg::Util::Execution.capture3("#{Pkg::Util::Tool::GIT} rev-parse --abbrev-ref HEAD")
    stdout.strip
  end
end