mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #34462 from terminalmage/git-describe-always
Use --always when available to git describe
This commit is contained in:
commit
e2f576e847
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user