Check remote tags before deciding to do a fetch #42329

This commit is contained in:
Steven Joseph 2017-07-17 14:07:36 +10:00
parent bc1effc4f2
commit 389c037285

View file

@ -1308,6 +1308,19 @@ def latest(name,
'if it does not already exist).',
comments
)
if set(all_local_tags) != set([
x.split('/')[-1] for x in __salt__['git.ls_remote'](
cwd=target,
remote=remote,
opts="--tags",
user=user,
password=password,
identity=identity,
saltenv=__env__,
ignore_retcode=True,
).keys()
]):
has_remote_rev = False
if not has_remote_rev:
try: