class Lolcommits::VCSInfo

Public Class Methods

local_name(path = '.') click to toggle source
# File lib/lolcommits/vcs_info.rb, line 9
def self.local_name(path = '.')
  if GitInfo.repo_root?(path)
    GitInfo.local_name(path)
  elsif MercurialInfo.repo_root?(path)
    MercurialInfo.local_name(path)
  else
    raise "'#{File.expand_path(path)}' is not the root of a supported VCS"
  end
end
repo_root?(path = '.') click to toggle source
# File lib/lolcommits/vcs_info.rb, line 5
def self.repo_root?(path = '.')
  GitInfo.repo_root?(path) || MercurialInfo.repo_root?(path)
end