Skip to content

Commit

Permalink
feat: Show commit timestamp (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
domiwei authored and zivyangll committed Dec 14, 2018
1 parent a5b6668 commit c80d0e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/gitblame.vim
Expand Up @@ -55,9 +55,10 @@ function! gitblame#commit_summary(file, line)

let author = matchstr(git_blame[1], 'author \zs.\+$')
let author_mail = matchstr(git_blame[2], 'author-mail \zs.\+$')
let timestamp = split(s:system('date -r ' .matchstr(git_blame[3], 'author-time \zs.\+$')), "\n")[0]
let blank = ' '

return '['.commit_hash[0:8].'] '.summary .blank .author_mail .blank .author
return '['.commit_hash[0:8].'] '.summary .blank .author_mail .blank .author .blank .'('.timestamp.')'
endfunction

function! gitblame#echo()
Expand Down

0 comments on commit c80d0e6

Please sign in to comment.