Move s:SameRepo() next to other Git dir functions

This commit is contained in:
Tim Pope
2022-05-27 21:01:09 -04:00
parent 097ce939da
commit 41939b09cb

View File

@@ -186,11 +186,6 @@ function! s:cpath(path, ...) abort
return a:0 ? path ==# s:cpath(a:1) : path
endfunction
function! s:SameRepo(one, two) abort
let one = s:GitDir(a:one)
return !empty(one) && one ==# s:GitDir(a:two)
endfunction
let s:executables = {}
function! s:executable(binary) abort
@@ -507,6 +502,11 @@ function! s:GitDir(...) abort
return a:0 ? FugitiveGitDir(a:1) : FugitiveGitDir()
endfunction
function! s:SameRepo(one, two) abort
let one = s:GitDir(a:one)
return !empty(one) && one ==# s:GitDir(a:two)
endfunction
function! s:DirUrlPrefix(...) abort
return 'fugitive://' . call('s:GitDir', a:000) . '//'
endfunction