class Git::Cop::Branches::Environments::Local

Provides feature branch information for local development environment.

Attributes

shell[R]

Public Class Methods

new(shell: Open3) click to toggle source
# File lib/git/cop/branches/environments/local.rb, line 11
def initialize shell: Open3
  @shell = shell
end

Public Instance Methods

name() click to toggle source
# File lib/git/cop/branches/environments/local.rb, line 15
def name
  result, _status = shell.capture2e "git rev-parse --abbrev-ref HEAD | tr -d '\n'"
  result
end
shas() click to toggle source
# File lib/git/cop/branches/environments/local.rb, line 20
def shas
  result, _status = shell.capture2e %(git log --pretty=format:"%H" master..#{name})
  result.split("\n")
end