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 committed 2022-06-23 18:09:40 -04:00
1 parent 8165eada59
commit 80cd9c876e
2 files changed
+9 -10

No files matched your search

+4
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)