Method: Heidi::Git#log
- Defined in:
- lib/heidi/git.rb
#log(amount, format = nil, commit = nil) ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/heidi/git.rb', line 109 def log(amount, format=nil, commit=nil) args = %W(log -n#{amount}) if !format.nil? && format !~ /\%/ commit = format format = nil end args << "--pretty=#{format}" unless format.nil? args << commit unless commit.nil? @shell.git(args).out end |