Keep track of the default branch of the origin (#1272)

Fix #1005

vim-plug will now run `git remote set-head origin -a` on PlugUpdate to
keep track of the default branch of the origin, so that it can still
update a plugin even if its default branch has changed.

This additional command will slow down the update process, but this is
an unavoidable price to pay for the correctness of the task. However,
vim-plug will run checkout and merge commands in parallel, so this
improvement will slightly offset the slowdown.
This commit is contained in:
Junegunn Choi authored and GitHub committed 2024-03-07 00:18:49 +09:00
1 parent e2974a3367
commit ed19478ce2
2 files changed
+61 -30

No files matched your search

+2 -1
View File
@@ -983,7 +983,8 @@ Execute (PlugInstall!):
Assert filereadable(g:plugs['vim-easy-align'].dir.'/installed2'),
\ 'vim-easy-align/installed2 should exist'
AssertEqual '7f8cd78cb1fe52185b98b16a3749811f0cc508af', GitCommit('vim-pseudocl')
AssertEqual 'no-t_co', GitBranch('seoul256.vim')
" Was updated to the default branch of origin by previous PlugUpdate
AssertEqual 'master', GitBranch('seoul256.vim')
AssertEqual '1.5.3', GitTag('goyo.vim')
Execute (When submodules are not initialized):