mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #46185 from terminalmage/issue46124
gitfs: Fix detection of base env when its ref is also mapped to a different env
This commit is contained in:
commit
390d592aa6
@ -1982,6 +1982,9 @@ class GitBase(object):
|
|||||||
for saltenv, saltenv_conf in six.iteritems(repo_obj.saltenv):
|
for saltenv, saltenv_conf in six.iteritems(repo_obj.saltenv):
|
||||||
if 'ref' in saltenv_conf:
|
if 'ref' in saltenv_conf:
|
||||||
ref = saltenv_conf['ref']
|
ref = saltenv_conf['ref']
|
||||||
|
repo_obj.saltenv_revmap.setdefault(
|
||||||
|
ref, []).append(saltenv)
|
||||||
|
|
||||||
if saltenv == 'base':
|
if saltenv == 'base':
|
||||||
# Remove redundant 'ref' config for base saltenv
|
# Remove redundant 'ref' config for base saltenv
|
||||||
repo_obj.saltenv[saltenv].pop('ref')
|
repo_obj.saltenv[saltenv].pop('ref')
|
||||||
@ -1996,9 +1999,6 @@ class GitBase(object):
|
|||||||
)
|
)
|
||||||
# Rewrite 'base' config param
|
# Rewrite 'base' config param
|
||||||
repo_obj.base = ref
|
repo_obj.base = ref
|
||||||
else:
|
|
||||||
repo_obj.saltenv_revmap.setdefault(
|
|
||||||
ref, []).append(saltenv)
|
|
||||||
|
|
||||||
# Build list of all envs defined by ref mappings in the
|
# Build list of all envs defined by ref mappings in the
|
||||||
# per-remote 'saltenv' param. We won't add any matching envs
|
# per-remote 'saltenv' param. We won't add any matching envs
|
||||||
|
Loading…
Reference in New Issue
Block a user