mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #48689 from linoplt/fix_38310_pygit2_checkout_ext_pillar_remote_using_tag
Fix ext_pillar remote checkout using tag (pygit2)
This commit is contained in:
commit
00d06bda76
1 changed files with 5 additions and 4 deletions
|
@ -1534,9 +1534,9 @@ class Pygit2(GitProvider):
|
|||
|
||||
elif tag_ref in refs:
|
||||
tag_obj = self.repo.revparse_single(tag_ref)
|
||||
if not isinstance(tag_obj, pygit2.Tag):
|
||||
if not isinstance(tag_obj, pygit2.Commit):
|
||||
log.error(
|
||||
'%s does not correspond to pygit2.Tag object',
|
||||
'%s does not correspond to pygit2.Commit object',
|
||||
tag_ref
|
||||
)
|
||||
else:
|
||||
|
@ -1556,9 +1556,10 @@ class Pygit2(GitProvider):
|
|||
exc_info=True
|
||||
)
|
||||
return None
|
||||
log.debug('SHA of tag %s: %s', tgt_ref, tag_sha)
|
||||
|
||||
if head_sha != target_sha:
|
||||
if not _perform_checkout(local_ref, branch=False):
|
||||
if head_sha != tag_sha:
|
||||
if not _perform_checkout(tag_ref, branch=False):
|
||||
return None
|
||||
|
||||
# Return the relative root, if present
|
||||
|
|
Loading…
Add table
Reference in a new issue