Interpret the second argument to Plug command as tag option

The older documentation of vim-plug suggested that the second string
parameter to Plug command was for both branches and tags. But we've
realized that tags and branches are not interchangeable (#174), and it
is now recommended that the user explicitly specify whether it's a
branch or a tag. The now-undocumented second parameter is currently for
branches, but I'd like to change it for tags, as the use of tags are
much more common.
This commit is contained in:
Junegunn Choi
2015-02-21 12:26:11 +09:00
parent bb48508c3e
commit 95aa96a884
3 changed files with 5 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ Execute (Subsequent plug#begin() calls will reuse g:plug_home):
Execute (Test Plug command):
^ Git repo with branch (DEPRECATED. USE BRANCH OPTION)
Plug 'junegunn/seoul256.vim', 'yes-t_co'
Plug 'junegunn/seoul256.vim', { 'branch': 'yes-t_co' }
AssertEqual 'file:///tmp/junegunn/seoul256.vim', g:plugs['seoul256.vim'].uri
AssertEqual join([temp_plugged, 'seoul256.vim/'], '/'), g:plugs['seoul256.vim'].dir
AssertEqual 'yes-t_co', g:plugs['seoul256.vim'].branch
@@ -45,7 +45,7 @@ Execute (Test Plug command):
Plug 'junegunn/goyo.vim', '1.5.2'
AssertEqual 'file:///tmp/junegunn/goyo.vim', g:plugs['goyo.vim'].uri
AssertEqual join([temp_plugged, 'goyo.vim/'], '/'), g:plugs['goyo.vim'].dir
AssertEqual '1.5.2', g:plugs['goyo.vim'].branch
AssertEqual '1.5.2', g:plugs['goyo.vim'].tag
Plug 'junegunn/goyo.vim', { 'tag': '1.5.3' } " Using tag option
AssertEqual '1.5.3', g:plugs['goyo.vim'].tag