mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Fix status in bare repository
This commit is contained in:
@@ -1853,7 +1853,11 @@ function! fugitive#BufReadStatus() abort
|
||||
let [staged, unstaged, untracked] = [[], [], []]
|
||||
let props = {}
|
||||
|
||||
if fugitive#GitVersion(2, 11)
|
||||
let pull = ''
|
||||
if empty(s:Tree())
|
||||
let branch = FugitiveHead(0)
|
||||
let head = FugitiveHead(11)
|
||||
elseif fugitive#GitVersion(2, 11)
|
||||
let cmd += ['status', '--porcelain=v2', '-bz']
|
||||
let [output, message, exec_error] = s:NullError(cmd)
|
||||
if exec_error
|
||||
@@ -1912,7 +1916,6 @@ function! fugitive#BufReadStatus() abort
|
||||
call remove(output, 0)
|
||||
endwhile
|
||||
let head = matchstr(output[0], '^## \zs\S\+\ze\%($\| \[\)')
|
||||
let pull = ''
|
||||
if head =~# '\.\.\.'
|
||||
let [head, pull] = split(head, '\.\.\.')
|
||||
let branch = head
|
||||
@@ -1947,10 +1950,6 @@ function! fugitive#BufReadStatus() abort
|
||||
endwhile
|
||||
endif
|
||||
|
||||
if empty(s:Tree())
|
||||
let [unstaged, untracked] = [[], []]
|
||||
endif
|
||||
|
||||
for dict in staged
|
||||
let b:fugitive_files['Staged'][dict.filename] = dict
|
||||
endfor
|
||||
|
||||
Reference in New Issue
Block a user