Skip to content

Commit

Permalink
Merge pull request #34463 from terminalmage/issue34371
Browse files Browse the repository at this point in the history
states/git: pass required cwd parameter to git.describe.
  • Loading branch information
Mike Place committed Jul 6, 2016
2 parents 8f8a6d2 + f981a56 commit ae69022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/states/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit ae69022

Please sign in to comment.