Skip to content

Commit

Permalink
do git pull before git checkout to ensure checking out new revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
avimar committed Jul 29, 2012
1 parent 63d6e96 commit 69ec588
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/states/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def latest(name,
ret,
('Repository {0} update is probably required (current '
'revision is {1})').format(target, current_rev))

__salt__['git.pull'](target, user=runas)
if rev:
__salt__['git.checkout'](target, rev, user=runas)
__salt__['git.pull'](target, user=runas)

if submodules:
__salt__['git.submodule'](target, user=runas)
Expand Down

0 comments on commit 69ec588

Please sign in to comment.