Fix for gitfs base env being pinned to commit ID

This worked when done through per-saltenv configuration (which causes a
warning to be logged), but not when configured like it is supposed to.
This commit is contained in:
Erik Johnson 2018-06-13 13:58:03 -05:00
parent 9e1d0040e4
commit 31ab2fe8de
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

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:]