def list_branch(path = Dir.pwd)
      cg = MiniGit::Capturing.new(path)
      res = cg.branch :a => true
      res = res.split("\n")
      # Eventually reorder to make the first element of the array the current branch
      i = res.find_index { |e| e =~ /^\*\s/ }
      res[0], res[i] = res[i], res[0] unless (i.nil? || i.zero?)
      res.each { |e| e.sub!(/^\*?\s+/, '') }
      res
    end
def list_branch(path = Dir.pwd)
      cg = MiniGit::Capturing.new(path)
      res = cg.branch :a => true
      res = res.split("\n")
      # Eventually reorder to make the first element of the array the current branch
      i = res.find_index { |e| e =~ /^\*\s/ }
      res[0], res[i] = res[i], res[0] unless (i.nil? || i.zero?)
      res.each { |e| e.sub!(/^\*?\s+/, '') }
      res
    end
Get an array of the local branches present (first element is always the
 current branch)