Fix Projectionist root for .git/info/projections.json

This commit is contained in:
Tim Pope
2022-06-23 17:54:30 -04:00
parent eac5ffd35b
commit 8165eada59

View File

@@ -527,7 +527,7 @@ endif
function! s:ProjectionistDetect() abort function! s:ProjectionistDetect() abort
let file = s:Slash(get(g:, 'projectionist_file', '')) let file = s:Slash(get(g:, 'projectionist_file', ''))
let dir = FugitiveExtractGitDir(file) let dir = FugitiveExtractGitDir(file)
let base = get(matchlist(file, s:dir_commit_file), 1, '') let base = matchstr(file, '^fugitive://.\{-\}//\x\+')
if empty(base) if empty(base)
let base = s:Tree(dir) let base = s:Tree(dir)
endif endif