From 41939b09cb57e1929c62cf083203579409a93ab2 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 27 May 2022 21:01:09 -0400 Subject: [PATCH] Move s:SameRepo() next to other Git dir functions --- autoload/fugitive.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7abb681..fffe585 100644 --- 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