mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update old "ref" references to "rev" in git.detached state
Fixes #42381 The "rev" kwarg was added to replace "ref" in #38898, however, when switching the state over to "rev", some stacktraces occur due to some remaining "ref" references.
This commit is contained in:
parent
fceaaf41d0
commit
b9a4669e5a
1 changed files with 2 additions and 2 deletions
|
@ -2213,7 +2213,7 @@ def detached(name,
|
|||
|
||||
# Determine if supplied ref is a hash
|
||||
remote_rev_type = 'ref'
|
||||
if len(ref) <= 40 \
|
||||
if len(rev) <= 40 \
|
||||
and all(x in string.hexdigits for x in rev):
|
||||
rev = rev.lower()
|
||||
remote_rev_type = 'hash'
|
||||
|
@ -2419,7 +2419,7 @@ def detached(name,
|
|||
https_pass=https_pass,
|
||||
ignore_retcode=False)
|
||||
|
||||
if 'refs/remotes/'+remote+'/'+ref in all_remote_refs:
|
||||
if 'refs/remotes/'+remote+'/'+rev in all_remote_refs:
|
||||
checkout_commit_id = all_remote_refs['refs/remotes/' + remote + '/' + rev]
|
||||
elif 'refs/tags/' + rev in all_remote_refs:
|
||||
checkout_commit_id = all_remote_refs['refs/tags/' + rev]
|
||||
|
|
Loading…
Add table
Reference in a new issue