Module: PreCommit::Configuration::TopLevel

Included in:
Providers::Yaml, Utils::StagedFiles
Defined in:
lib/pre-commit/configuration/top_level.rb

Instance Method Summary collapse

Instance Method Details

#top_levelObject



4
5
6
7
8
# File 'lib/pre-commit/configuration/top_level.rb', line 4

def top_level
  top_level = `git rev-parse --show-toplevel`.chomp.strip
  raise "no git repo!" if top_level == ""
  top_level
end