Merge pull request #48103 from terminalmage/gitfs-base-pinned-to-commit

Fix for gitfs base env being pinned to commit ID
This commit is contained in:
Nicole Thomas 2018-06-14 12:29:24 -04:00 committed by GitHub
commit 0e3f846836
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -476,6 +476,10 @@ class GitProvider(object):
use_tags = 'tag' in self.ref_types
ret = set()
if salt.utils.stringutils.is_hex(self.base):
# gitfs_base or per-saltenv 'base' may point to a commit ID, which
# would not show up in the refs. Make sure we include it.
ret.add('base')
for ref in salt.utils.data.decode(refs):
if ref.startswith('refs/'):
ref = ref[5:]