diff --git a/plug.vim b/plug.vim index f2b5f44..56d14ce 100644 --- a/plug.vim +++ b/plug.vim @@ -439,12 +439,9 @@ function! s:parse_options(arg) let opts = copy(s:base_spec) let type = type(a:arg) if type == s:TYPE.string - let opts.branch = a:arg + let opts.tag = a:arg elseif type == s:TYPE.dict call extend(opts, a:arg) - if has_key(opts, 'tag') - let opts.tag = remove(opts, 'tag') - endif if has_key(opts, 'dir') let opts.dir = s:dirpath(expand(opts.dir)) endif diff --git a/test/regressions.vader b/test/regressions.vader index 1aff20b..2280178 100644 --- a/test/regressions.vader +++ b/test/regressions.vader @@ -100,7 +100,7 @@ Execute (#139-1 Using new remote branch): " We're setting up two plugins so that parallel installer is used call plug#begin('$TMPDIR/plugged') Plug 'junegunn/seoul256.vim' - Plug expand('file:///$TMPDIR/new-branch'), 'new' + Plug expand('file:///$TMPDIR/new-branch'), { 'branch': 'new' } call plug#end() PlugUpdate silent %y @@ -130,7 +130,7 @@ Execute (#139-2 Using yet another new remote branch): " Test Vim installer here call plug#begin('$TMPDIR/plugged') - Plug expand('file:///$TMPDIR/new-branch'), 'brand-new' + Plug expand('file:///$TMPDIR/new-branch'), { 'branch': 'brand-new' } call plug#end() PlugUpdate silent %y diff --git a/test/workflow.vader b/test/workflow.vader index 21ec7e7..d8ad34b 100644 --- a/test/workflow.vader +++ b/test/workflow.vader @@ -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