mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-10 12:33:46 -05:00
Use parameterized Git dir when completing heads
This commit is contained in:
@@ -1536,9 +1536,12 @@ function! fugitive#PathComplete(...) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:CompleteHeads(dir) abort
|
function! s:CompleteHeads(dir) abort
|
||||||
|
if empty(a:dir)
|
||||||
|
return []
|
||||||
|
endif
|
||||||
let dir = fugitive#Find('.git/', a:dir)
|
let dir = fugitive#Find('.git/', a:dir)
|
||||||
return sort(filter(['HEAD', 'FETCH_HEAD', 'ORIG_HEAD'] + s:merge_heads, 'filereadable(dir . v:val)')) +
|
return sort(filter(['HEAD', 'FETCH_HEAD', 'ORIG_HEAD'] + s:merge_heads, 'filereadable(dir . v:val)')) +
|
||||||
\ sort(s:LinesError('rev-parse', '--symbolic', '--branches', '--tags', '--remotes')[0])
|
\ sort(s:LinesError([a:dir, 'rev-parse', '--symbolic', '--branches', '--tags', '--remotes'])[0])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fugitive#CompleteObject(base, ...) abort
|
function! fugitive#CompleteObject(base, ...) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user