mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
Cope gracefully with missing .git/index
This commit is contained in:
@@ -2069,7 +2069,7 @@ function! s:TreeInfo(dir, commit) abort
|
|||||||
if a:commit =~# '^:\=[0-3]$'
|
if a:commit =~# '^:\=[0-3]$'
|
||||||
let index = get(s:indexes, key, [])
|
let index = get(s:indexes, key, [])
|
||||||
let newftime = getftime(fugitive#Find('.git/index', a:dir))
|
let newftime = getftime(fugitive#Find('.git/index', a:dir))
|
||||||
if get(index, 0, -1) < newftime
|
if get(index, 0, -2) < newftime
|
||||||
let [lines, exec_error] = s:LinesError([a:dir, 'ls-files', '--stage', '--'])
|
let [lines, exec_error] = s:LinesError([a:dir, 'ls-files', '--stage', '--'])
|
||||||
let s:indexes[key] = [newftime, {'0': {}, '1': {}, '2': {}, '3': {}}]
|
let s:indexes[key] = [newftime, {'0': {}, '1': {}, '2': {}, '3': {}}]
|
||||||
if exec_error
|
if exec_error
|
||||||
|
|||||||
Reference in New Issue
Block a user