From 1aefa1aed27b0f06be959f71314e496e68d6bdca Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 16 Jun 2022 15:47:12 -0400 Subject: [PATCH] Cope gracefully with missing .git/index --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3fbe727..118572f 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2069,7 +2069,7 @@ function! s:TreeInfo(dir, commit) abort if a:commit =~# '^:\=[0-3]$' let index = get(s:indexes, key, []) 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 s:indexes[key] = [newftime, {'0': {}, '1': {}, '2': {}, '3': {}}] if exec_error