mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 12:53:52 -05:00
Provide default merge head for "." remote
Almost included this in f75dbb1967, 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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user