commit 41939b09cb57e1929c62cf083203579409a93ab2 (tree)
parent 097ce939da3a8e7bc3357064535ea29ea41ae408
Author: Tim Pope <code@tpope.net>
Date: Fri, 27 May 2022 21:01:09 -0400
Move s:SameRepo() next to other Git dir functions
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -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