Drop some silly instance methods

This commit is contained in:
Tim Pope
2018-07-19 00:34:04 -04:00
parent 0aa3389f5c
commit 8c076e3f68
2 changed files with 60 additions and 76 deletions

View File

@@ -132,10 +132,11 @@ function! FugitiveStatusline(...) abort
endfunction
function! FugitiveHead(...) abort
if !exists('b:git_dir')
let dir = a:0 > 1 ? a:2 : get(b:, 'git_dir', '')
if empty(dir)
return ''
endif
return fugitive#repo().head(a:0 ? a:1 : 0)
return fugitive#repo(dir).head(a:0 ? a:1 : 0)
endfunction
function! FugitivePath(...) abort