From 798f65a1808284e878fd5db1f915f98a638fd548 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 27 May 2021 10:36:50 -0400 Subject: [PATCH] Fix variable reference in s:Remote() --- autoload/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index f019da6..c942188 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -666,11 +666,11 @@ endfunction function! s:Remote(dir) abort let head = FugitiveHead(0, a:dir) - let remote = len(head) ? FugitiveConfigGet('branch.' . head . '.remote', dir) : '' + let remote = len(head) ? FugitiveConfigGet('branch.' . head . '.remote', a:dir) : '' let i = 10 while remote ==# '.' && i > 0 - let head = matchstr(FugitiveConfigGet('branch.' . head . '.merge', dir), 'refs/heads/\zs.*') - let remote = len(head) ? FugitiveConfigGet('branch.' . head . '.remote', dir) : '' + let head = matchstr(FugitiveConfigGet('branch.' . head . '.merge', a:dir), 'refs/heads/\zs.*') + let remote = len(head) ? FugitiveConfigGet('branch.' . head . '.remote', a:dir) : '' let i -= 1 endwhile return remote =~# '^\.\=$' ? 'origin' : remote