Skip to content

Commit

Permalink
Set --origin=origin for git clone commands (#1117)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gibfahn authored Aug 31, 2021
1 parent 66e038d commit c997134
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c997134

Please sign in to comment.