mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42399 from rallytime/fix-42381
Update old "ref" references to "rev" in git.detached state
This commit is contained in:
commit
0b3179135c
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