mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 23:33:43 -05:00
Pass absolute paths through FugitiveGenerate() unchanged
This is designed to exclude traditional paths, URLs, and also Vim constructs like zipfile:c:\foo.zip::file.
This commit is contained in:
@@ -159,6 +159,9 @@ function! FugitivePath(...) abort
|
||||
endfunction
|
||||
|
||||
function! FugitiveGenerate(...) abort
|
||||
if a:0 && s:shellslash(a:0) =~# '^\%(\a\a\+:\)\=\%(a:\)\=/\|^[~$]'
|
||||
return a:1
|
||||
endif
|
||||
return fugitive#repo(a:0 > 1 ? a:2 : get(b:, 'git_dir', '')).translate(a:0 ? a:1 : '', 1)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user