class Terragov::Git

Public Instance Methods

branch_name(directory) click to toggle source
# File lib/terragov/git.rb, line 6
def branch_name(directory)
  unless File.exist?(File.join(directory, '.git'))
    exit unless HighLine.agree("#{directory} not a git repository, do you wish to continue?")
  end

  branch = ::Git.open(directory).current_branch

  branch
end
compare_branch(dir_a, dir_b) click to toggle source
# File lib/terragov/git.rb, line 16
def compare_branch(dir_a, dir_b)
  branch_name(dir_a) == branch_name(dir_b)
end