mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Handle bare repos in FugitivePath()
This commit is contained in:
@@ -439,12 +439,12 @@ endfunction
|
|||||||
function! fugitive#Path(url) abort
|
function! fugitive#Path(url) abort
|
||||||
let [dir, commit, file] = s:DirCommitFile(a:url)
|
let [dir, commit, file] = s:DirCommitFile(a:url)
|
||||||
if len(dir)
|
if len(dir)
|
||||||
return s:PlatformSlash(FugitiveTreeForGitDir(dir) . file)
|
let tree = FugitiveTreeForGitDir(dir)
|
||||||
|
return s:PlatformSlash((len(tree) ? tree : dir) . file)
|
||||||
elseif a:url =~# '^[\\/]\|^\a:[\\/]'
|
elseif a:url =~# '^[\\/]\|^\a:[\\/]'
|
||||||
return s:PlatformSlash(a:url)
|
return s:PlatformSlash(a:url)
|
||||||
else
|
|
||||||
return ''
|
|
||||||
endif
|
endif
|
||||||
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:buffer_prototype = {}
|
let s:buffer_prototype = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user