Permalink
Browse files

Leverage #head() in #statusline()

  • Loading branch information...
1 parent 43741b5 commit 476fbd09508a3de1eddb76d74089392c5254aa53 @tpope committed May 7, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 plugin/fugitive.vim
View
@@ -2387,12 +2387,7 @@ function! fugitive#statusline(...)
if s:buffer().commit() != ''
let status .= ':' . s:buffer().commit()[0:7]
endif
- let head = s:repo().head_ref()
- if head =~# '^ref: '
- let status .= s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','(').')'
- elseif head =~# '^\x\{40\}$'
- let status .= '('.head[0:7].')'
- endif
+ let status .= '('.fugitive#head(7).')'
if &statusline =~# '%[MRHWY]' && &statusline !~# '%[mrhwy]'
return ',GIT'.status
else

0 comments on commit 476fbd0

Please sign in to comment.