Fix :Gedit default from commit to work tree

This commit is contained in:
Tim Pope 2018-08-02 15:16:29 -04:00
parent 84fcfae7f0
commit 80e410c81a

View File

@ -498,7 +498,7 @@ function! fugitive#Path(url, ...) abort
let file = '/.git'.url[strlen(dir) : -1] let file = '/.git'.url[strlen(dir) : -1]
elseif len(tree) && s:cpath(url[0 : len(tree)]) ==# s:cpath(tree . '/') elseif len(tree) && s:cpath(url[0 : len(tree)]) ==# s:cpath(tree . '/')
let file = url[len(tree) : -1] let file = url[len(tree) : -1]
elseif s:cpath(url) ==# s:cpath(tree) elseif s:cpath(url) ==# s:cpath(tree) || len(argdir) && empty(file)
let file = '/' let file = '/'
endif endif
if empty(file) && a:1 =~# '^\%([.:]\=/\)\=$' if empty(file) && a:1 =~# '^\%([.:]\=/\)\=$'