From 85eef8003e378f779c6d96a8b2ad4fba6e4e60f2 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 2 Mar 2024 13:33:08 -0500 Subject: [PATCH] Don't assume default value for branch.*.merge Commands like git-merge and git-pull seem not to make this assumption, so neither should we. --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 4c20766..4c8fed0 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2885,9 +2885,9 @@ function! fugitive#BufReadStatus(cmdbang) abort if empty(fetch_remote) || empty(branch) let pull_ref = '' elseif fetch_remote ==# '.' - let pull_ref = config.Get('branch.' . branch . '.merge', 'refs/heads/' . branch) + let pull_ref = config.Get('branch.' . branch . '.merge', '') else - let pull_ref = substitute(config.Get('branch.' . branch . '.merge', 'refs/heads/' . branch), '^refs/heads/', 'refs/remotes/' . fetch_remote . '/', '') + let pull_ref = substitute(config.Get('branch.' . branch . '.merge', ''), '^refs/heads/', 'refs/remotes/' . fetch_remote . '/', '') endif if len(pull_ref) let rebase = FugitiveConfigGet('branch.' . branch . '.rebase', config)