Compare timestamps as integers

This commit is contained in:
Tim Pope
2010-01-30 00:38:00 -05:00
parent eb48c6c284
commit 06d6684d08

View File

@@ -973,8 +973,8 @@ function! s:buffer_compare_age(commit) dict abort
elseif base ==# a:commit
return 1
endif
let my_time = self.repo().git_chomp('log','--max-count=1','--pretty=format:%at',self.commit())
let their_time = self.repo().git_chomp('log','--max-count=1','--pretty=format:%at',a:commit)
let my_time = +self.repo().git_chomp('log','--max-count=1','--pretty=format:%at',self.commit())
let their_time = +self.repo().git_chomp('log','--max-count=1','--pretty=format:%at',a:commit)
return my_time < their_time ? -1 : my_time != their_time
endfunction