module Overcommit::GitConfig

Get configuration options from git

Public Instance Methods

comment_character() click to toggle source
# File lib/overcommit/git_config.rb, line 10
def comment_character
  char = `git config --get core.commentchar`.chomp
  char = '#' if char == ''
  char
end
hooks_path() click to toggle source
# File lib/overcommit/git_config.rb, line 16
def hooks_path
  path = `git config --get core.hooksPath`.chomp
  return File.join(Overcommit::Utils.git_dir, 'hooks') if path.empty?
  File.absolute_path(path, Dir.pwd)
end