lib/gitrb/repository.rb in gitrb-0.0.7 vs lib/gitrb/repository.rb in gitrb-0.0.8
- old
+ new
@@ -143,10 +143,11 @@
commit
end
# Returns a list of commits starting from head commit.
def log(limit = 10, start = nil, path = nil)
- args = ['--format=tformat:%H%n%P%n%T%n%an%n%ae%n%at%n%cn%n%ce%n%ct%n%x00%s%n%b%x00', "-#{limit}", ]
+ ### FIX: tformat need --pretty option
+ args = ['--pretty=tformat:%H%n%P%n%T%n%an%n%ae%n%at%n%cn%n%ce%n%ct%n%x00%s%n%b%x00', "-#{limit}", ]
args << start if start
args << "--" << path if path && !path.empty?
log = git_log(*args).split(/\n*\x00\n*/)
commits = []
log.each_slice(2) do |data, message|