Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add date column for log source.

  • Loading branch information...
commit 5203e5dfe50b1c46685783f1fa9da79da4219068 1 parent d769066
@hrsh7th authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  autoload/unite/sources/vcs/log.vim
  2. +1 −1  autoload/vcs/git/log.vim
View
3  autoload/unite/sources/vcs/log.vim
@@ -28,9 +28,10 @@ function! s:source.gather_candidates(args, context)
let logs = vcs#vcs('log', [path])
let revisionlen = max(map(copy(logs), "strlen(v:val.revision)"))
+ let datelen = max(map(copy(logs), "strlen(split(v:val.date, ' ')[0])"))
let authorlen = max(map(copy(logs), "strlen(split(v:val.author, ' ')[0])"))
return map(logs, "{
- \ 'word': s:padding(v:val.revision, revisionlen) . ' | '. s:padding(split(v:val.author, ' ')[0], authorlen) . ' | ' . v:val.message,
+ \ 'word': s:padding(v:val.revision, revisionlen) . ' | '. s:padding(v:val.date, datelen) . ' | '. s:padding(v:val.author, authorlen) . ' | ' . v:val.message,
\ 'action__path': v:val.path,
\ 'action__revision': v:val.revision,
\ 'action__prev_revision': v:val.prev_revision,
View
2  autoload/vcs/git/log.vim
@@ -34,7 +34,7 @@ function! s:parse(target, list)
\ "revision": v:val[0],
\ "prev_revision": v:val[1],
\ "author": v:val[2],
- \ "date": v:val[4],
+ \ "date": join(split(v:val[4], " ")[0:1], " "),
\ "message": v:val[5],
\ "path": a:target
\ }')
Please sign in to comment.
Something went wrong with that request. Please try again.