From f981a5646a81ae979ea663e0cc3f24cbcdbce1b4 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Wed, 29 Jun 2016 21:10:36 +0100 Subject: [PATCH] states/git: pass required cwd parameter to git.describe. --- salt/states/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/states/git.py b/salt/states/git.py index b96540bc1bcd..666085916e05 100644 --- a/salt/states/git.py +++ b/salt/states/git.py @@ -1946,7 +1946,7 @@ def detached(name, local_commit_id = _get_local_rev_and_branch(target, user)[0] - if remote_ref_type is 'hash' and __salt__['git.describe'](ref): + if remote_ref_type is 'hash' and __salt__['git.describe'](target, ref): # The ref is a hash and it exists locally so skip to checkout hash_exists_locally = True else: @@ -2110,7 +2110,7 @@ def detached(name, #get refs and checkout checkout_commit_id = '' if remote_ref_type is 'hash': - if __salt__['git.describe'](ref): + if __salt__['git.describe'](target, ref): checkout_commit_id = ref else: return _fail(