mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 19:43:46 -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 [staged, unstaged, untracked] = [[], [], []]
|
||||||
let props = {}
|
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 cmd += ['status', '--porcelain=v2', '-bz']
|
||||||
let [output, message, exec_error] = s:NullError(cmd)
|
let [output, message, exec_error] = s:NullError(cmd)
|
||||||
if exec_error
|
if exec_error
|
||||||
@@ -1912,7 +1916,6 @@ function! fugitive#BufReadStatus() abort
|
|||||||
call remove(output, 0)
|
call remove(output, 0)
|
||||||
endwhile
|
endwhile
|
||||||
let head = matchstr(output[0], '^## \zs\S\+\ze\%($\| \[\)')
|
let head = matchstr(output[0], '^## \zs\S\+\ze\%($\| \[\)')
|
||||||
let pull = ''
|
|
||||||
if head =~# '\.\.\.'
|
if head =~# '\.\.\.'
|
||||||
let [head, pull] = split(head, '\.\.\.')
|
let [head, pull] = split(head, '\.\.\.')
|
||||||
let branch = head
|
let branch = head
|
||||||
@@ -1947,10 +1950,6 @@ function! fugitive#BufReadStatus() abort
|
|||||||
endwhile
|
endwhile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if empty(s:Tree())
|
|
||||||
let [unstaged, untracked] = [[], []]
|
|
||||||
endif
|
|
||||||
|
|
||||||
for dict in staged
|
for dict in staged
|
||||||
let b:fugitive_files['Staged'][dict.filename] = dict
|
let b:fugitive_files['Staged'][dict.filename] = dict
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user