Fix fugitive#isdirectory() with trailing slash

This commit is contained in:
Tim Pope 2019-06-08 02:42:32 -04:00
parent bf7f05e62b
commit 6d42c7df44

View File

@ -942,7 +942,7 @@ function! s:PathInfo(url) abort
let path = substitute(file[1:-1], '/*$', '', '') let path = substitute(file[1:-1], '/*$', '', '')
let [tree, ftime] = s:TreeInfo(dir, commit) let [tree, ftime] = s:TreeInfo(dir, commit)
let entry = empty(path) ? [ftime, '040000', 'tree', '', -1] : get(tree, path, []) let entry = empty(path) ? [ftime, '040000', 'tree', '', -1] : get(tree, path, [])
if empty(entry) || file =~# '/$' && entry[1] !=# 'tree' if empty(entry) || file =~# '/$' && entry[2] !=# 'tree'
return [-1, '000000', '', '', -1] return [-1, '000000', '', '', -1]
else else
return entry return entry