mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-15 06:43:51 -05:00
Don't default to work tree on :Gedit invalidref:file
Closes https://github.com/tpope/vim-fugitive/issues/1667
This commit is contained in:
@@ -1019,11 +1019,7 @@ function! fugitive#Find(object, ...) abort
|
||||
if commit !~# '^[0-9a-f]\{40,\}$'
|
||||
let commit = matchstr(s:ChompDefault('', [dir, 'rev-parse', '--verify', commit . (len(file) ? '^{}' : ''), '--']), '\<[0-9a-f]\{40,\}\>')
|
||||
endif
|
||||
if len(commit)
|
||||
let f = 'fugitive://' . dir . '//' . commit . file
|
||||
else
|
||||
let f = base . '/' . substitute(rev, '^:/:\=\|^[^:]\+:', '', '')
|
||||
endif
|
||||
let f = 'fugitive://' . dir . '//' . (len(commit) ? commit : repeat('0', 40)) . file
|
||||
endif
|
||||
endif
|
||||
return FugitiveVimPath(f)
|
||||
|
||||
Reference in New Issue
Block a user