From 5b52a0f395065d6cb7b65a00a5e17eaf9ebd64d5 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 9 Mar 2023 14:07:17 -0500 Subject: [PATCH] Provide default merge head for "." remote Almost included this in f75dbb19672b590fe8e32334051314b47e91ae02, but dropped it because it always equal to the current branch, guaranteeing an empty log, and because unlike the "origin" default, it shouldn't really happen in practice. However if a user screws up their config in a way that forces it to happen, we should still try to avoid the same "Push" header issue. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 18c9dc1..ef7ab3d 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2817,7 +2817,7 @@ function! fugitive#BufReadStatus(...) abort if empty(fetch_remote) || empty(branch) let pull_ref = '' elseif fetch_remote ==# '.' - let pull_ref = FugitiveConfigGet('branch.' . branch . '.merge', config) + let pull_ref = config.Get('branch.' . branch . '.merge', 'refs/heads/' . branch) else let pull_ref = substitute(config.Get('branch.' . branch . '.merge', 'refs/heads/' . branch), '^refs/heads/', 'refs/remotes/' . fetch_remote . '/', '') endif