Skip to content

Commit

Permalink
Merge pull request #34462 from terminalmage/git-describe-always
Browse files Browse the repository at this point in the history
Use --always when available to git describe
  • Loading branch information
Mike Place committed Jul 6, 2016
2 parents 85f1f18 + 6ef7ee1 commit e2f576e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion salt/modules/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e2f576e

Please sign in to comment.