Method: Grit::Repo#log

Defined in:
lib/grit/repo.rb

#log(commit = 'master', path = nil, options = {}) ⇒ Object

The commit log for a treeish

Returns Grit::Commit[]



555
556
557
558
559
560
561
# File 'lib/grit/repo.rb', line 555

def log(commit = 'master', path = nil, options = {})
  default_options = {:pretty => "raw"}
  actual_options  = default_options.merge(options)
  arg = path ? [commit, '--', path] : [commit]
  commits = self.git.log(actual_options, *arg)
  Commit.list_from_string(self, commits)
end