mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Fix query operations in bare repositories
This commit is contained in:
@@ -175,7 +175,7 @@ function! s:TreeChomp(...) abort
|
|||||||
let tree = s:Tree(dir)
|
let tree = s:Tree(dir)
|
||||||
let pre = ''
|
let pre = ''
|
||||||
if empty(tree)
|
if empty(tree)
|
||||||
let args = ['--git-dir=' . dir] . args
|
let args = ['--git-dir=' . dir] + args
|
||||||
elseif s:cpath(tree) !=# s:cpath(getcwd())
|
elseif s:cpath(tree) !=# s:cpath(getcwd())
|
||||||
if fugitive#GitVersion() =~# '^[01]\.'
|
if fugitive#GitVersion() =~# '^[01]\.'
|
||||||
let pre = 'cd ' . s:shellesc(tree) . (s:winshell() ? ' & ' : '; ')
|
let pre = 'cd ' . s:shellesc(tree) . (s:winshell() ? ' & ' : '; ')
|
||||||
@@ -970,8 +970,10 @@ function! fugitive#PathComplete(base, ...) abort
|
|||||||
endif
|
endif
|
||||||
call s:Uniq(matches)
|
call s:Uniq(matches)
|
||||||
call map(matches, "'.git/' . v:val")
|
call map(matches, "'.git/' . v:val")
|
||||||
else
|
elseif len(tree) > 1
|
||||||
let matches = s:GlobComplete(tree, s:gsub(base, '/', '*&').'*')
|
let matches = s:GlobComplete(tree, s:gsub(base, '/', '*&').'*')
|
||||||
|
else
|
||||||
|
let matches = []
|
||||||
endif
|
endif
|
||||||
call map(matches, 's:fnameescape(s:Slash(matchstr(a:base, strip) . v:val))')
|
call map(matches, 's:fnameescape(s:Slash(matchstr(a:base, strip) . v:val))')
|
||||||
return matches
|
return matches
|
||||||
|
|||||||
Reference in New Issue
Block a user