Module: CommitMsgUrlShortener::Git
Instance Method Summary collapse
Instance Method Details
#toplevel ⇒ Object
4 5 6 7 8 |
# File 'lib/commit-msg-url-shortener/git.rb', line 4 def toplevel git_path = %x[git rev-parse --show-toplevel] rescue '' git_path.strip! git_path if File.directory? git_path end |