Improve robustness of status --porcelain=v1 parsing

References https://github.com/tpope/vim-fugitive/issues/1388
This commit is contained in:
Tim Pope
2019-10-27 18:53:19 -04:00
parent 0356edf6b8
commit f6acae50ea

View File

@@ -1673,6 +1673,9 @@ function! fugitive#BufReadStatus() abort
throw 'fugitive: ' . message
endif
while get(output, 0, '') =~# '^\l\+:'
call remove(output, 0)
endwhile
let head = matchstr(output[0], '^## \zs\S\+\ze\%($\| \[\)')
let pull = ''
if head =~# '\.\.\.'