mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Restrict use of --always to git 1.5.6 and newer
This commit is contained in:
parent
c554b22fc8
commit
6ef7ee198e
1 changed files with 4 additions and 1 deletions
|
@ -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', '--always', 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…
Add table
Reference in a new issue