Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

states/git: pass required cwd parameter to git.describe. #34463

Merged
merged 1 commit into from
Jul 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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