From c9971346bb486ccff354aaee8606cc0d2d5a0c97 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Tue, 31 Aug 2021 09:14:37 +0100 Subject: [PATCH] Set --origin=origin for git clone commands (#1117) Otherwise if the user has set a `git config clone.defaultRemoteName foo`, then vim-plug will fail to detect the latest upstream changes as the remote will be incorrect, and will repeatedly state that the plugin repo needs to be cleaned. --- plug.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 6a958cb..b6e4cbf 100644 --- a/plug.vim +++ b/plug.vim @@ -1208,7 +1208,8 @@ function! s:update_impl(pull, force, args) abort normal! 2G silent! redraw - let s:clone_opt = [] + " Set remote name, overriding a possible user git config's clone.defaultRemoteName + let s:clone_opt = ['--origin', 'origin'] if get(g:, 'plug_shallow', 1) call extend(s:clone_opt, ['--depth', '1']) if s:git_version_requirement(1, 7, 10)