mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Move s:SameRepo() next to other Git dir functions
This commit is contained in:
@@ -186,11 +186,6 @@ function! s:cpath(path, ...) abort
|
|||||||
return a:0 ? path ==# s:cpath(a:1) : path
|
return a:0 ? path ==# s:cpath(a:1) : path
|
||||||
endfunction
|
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 = {}
|
let s:executables = {}
|
||||||
|
|
||||||
function! s:executable(binary) abort
|
function! s:executable(binary) abort
|
||||||
@@ -507,6 +502,11 @@ function! s:GitDir(...) abort
|
|||||||
return a:0 ? FugitiveGitDir(a:1) : FugitiveGitDir()
|
return a:0 ? FugitiveGitDir(a:1) : FugitiveGitDir()
|
||||||
endfunction
|
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
|
function! s:DirUrlPrefix(...) abort
|
||||||
return 'fugitive://' . call('s:GitDir', a:000) . '//'
|
return 'fugitive://' . call('s:GitDir', a:000) . '//'
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user