Method: Chronicler::Git#current

Defined in:
lib/chronicler/git.rb

#current(path = nil) ⇒ Object



5
6
7
8
9
# File 'lib/chronicler/git.rb', line 5

def current(path = nil)
  if git("rev-parse --is-inside-work-tree 2> /dev/null", path) == "true"
    File.basename git("rev-parse --show-toplevel", path)
  end
end