diff --git a/salt/modules/git.py b/salt/modules/git.py index 00142e4c73..5eea1ca390 100644 --- a/salt/modules/git.py +++ b/salt/modules/git.py @@ -1350,7 +1350,10 @@ def describe(cwd, rev='HEAD', user=None, ignore_retcode=False): cwd = _expand_path(cwd, user) if not isinstance(rev, six.string_types): rev = str(rev) - command = ['git', 'describe', rev] + command = ['git', 'describe'] + if _LooseVersion(version(versioninfo=False)) >= _LooseVersion('1.5.6'): + command.append('--always') + command.append(rev) return _git_run(command, cwd=cwd, runas=user,