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.
This commit is contained in:
Tim Pope
2024-03-02 13:33:08 -05:00
parent 2e88f14a58
commit 85eef8003e

View File

@@ -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)