mirror of
https://github.com/junegunn/vim-plug.git
synced 2026-03-16 01:44:54 +08:00
Make Plug{Install,Update}! trigger post-fetch checkout, submodule update
Now `:PlugInstall!` and `:PlugUpdate!` forces to update submodules. `:PlugInstall!` now also checks out to new specified branch, tag, or commit. Also added tests for changing branch, tag, or commit.
This commit is contained in:
@@ -51,6 +51,18 @@ Execute (Initialize test environment):
|
||||
let &rtp = g:base_rtp
|
||||
endfunction
|
||||
|
||||
function! GitBranch(repo)
|
||||
return system(printf('cd %s && git rev-parse --abbrev-ref HEAD', g:plugs[a:repo].dir))[:-2]
|
||||
endfunction
|
||||
|
||||
function! GitTag(repo)
|
||||
return system(printf('cd %s && git describe --tags', g:plugs[a:repo].dir))[:-2]
|
||||
endfunction
|
||||
|
||||
function! GitCommit(repo)
|
||||
return system(printf('cd %s && git rev-parse HEAD', g:plugs[a:repo].dir))[:-2]
|
||||
endfunction
|
||||
|
||||
source $PLUG_SRC
|
||||
|
||||
Execute (Print Interpreter Version):
|
||||
|
||||
Reference in New Issue
Block a user