Skip to content

Commit

Permalink
Fix #355 - PlugSnapshot to create scripts that disable shallow-clone
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Dec 14, 2015
1 parent cd26cd5 commit 52d7da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2039,10 +2039,10 @@ function! s:snapshot(...) abort
let [type, var, header] = s:is_win ?
\ ['dosbatch', '%PLUG_HOME%',
\ ['@echo off', ':: Generated by vim-plug', ':: '.strftime("%c"), '',
\ ':: Make sure to PlugUpdate first', '', 'set PLUG_HOME='.home]] :
\ ':: Make sure to PlugUpdate first with `let g:plug_shallow = 0`', '', 'set PLUG_HOME='.home]] :
\ ['sh', '$PLUG_HOME',
\ ['#!/bin/sh', '# Generated by vim-plug', '# '.strftime("%c"), '',
\ 'vim +PlugUpdate +qa', '', 'PLUG_HOME='.s:esc(home)]]
\ 'vim -c ''let g:plug_shallow = 0 | PlugUpdate | qa''', '', 'PLUG_HOME='.s:esc(home)]]

call s:prepare()
execute 'setf' type
Expand Down
2 changes: 1 addition & 1 deletion test/workflow.vader
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ Execute (PlugSnapshot / #154 issues with paths containing spaces):
PlugSnapshot
AssertEqual '#!/bin/sh', getline(1)
AssertEqual '# Generated by vim-plug', getline(2)
AssertEqual 'vim +PlugUpdate +qa', getline(5)
AssertEqual 'vim -c ''let g:plug_shallow = 0 | PlugUpdate | qa''', getline(5)
AssertEqual 'PLUG_HOME=$TMPDIR/plug\ with\ spaces', getline(7)
AssertEqual 0, stridx(getline(9), 'cd $PLUG_HOME/seoul256.vim/ && git reset --hard')
AssertEqual 0, stridx(getline(10), 'cd $PLUG_HOME/vim-easy-align/ && git reset --hard')
Expand Down

0 comments on commit 52d7da3

Please sign in to comment.