Move FugitiveParse() implementation into autoload file

Anticipating changes here, so let's try to avoid the dreaded "old plugin
file loads new autoload file" edge case burning us.
This commit is contained in:
Tim Pope
2022-06-23 18:05:03 -04:00
parent 8165eada59
commit 80cd9c876e
2 changed files with 9 additions and 10 deletions

View File

@@ -1626,6 +1626,10 @@ function! s:DirRev(url) abort
return [dir, commit . file ==# '/.git/index' ? ':' : (!empty(dir) && commit =~# '^.$' ? ':' : '') . commit . substitute(file, '^/', ':', '')]
endfunction
function! fugitive#Parse(url) abort
return reverse(s:DirRev(a:url))
endfunction
let s:merge_heads = ['MERGE_HEAD', 'REBASE_HEAD', 'CHERRY_PICK_HEAD', 'REVERT_HEAD']
function! s:MergeHead(dir) abort
let dir = fugitive#Find('.git/', a:dir)