mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #26858 from terminalmage/git-latest-version-check
Fix a couple version checks for git state and execution module
This commit is contained in:
commit
a21b3f4cad
@ -70,7 +70,7 @@ def _config_getter(get_opt,
|
||||
command = ['git', 'config']
|
||||
if global_:
|
||||
command.append('--global')
|
||||
elif ver >= _LooseVersion('1.7.12'):
|
||||
elif ver >= _LooseVersion('1.7.10.2'):
|
||||
command.append('--local')
|
||||
|
||||
command.append(get_opt)
|
||||
@ -1132,7 +1132,7 @@ def config_unset(key,
|
||||
ver = _LooseVersion(version(versioninfo=False))
|
||||
if global_:
|
||||
command.append('--global')
|
||||
elif ver >= _LooseVersion('1.7.12'):
|
||||
elif ver >= _LooseVersion('1.7.10.2'):
|
||||
command.append('--local')
|
||||
|
||||
if cwd is None:
|
||||
|
@ -547,7 +547,7 @@ def latest(name,
|
||||
)
|
||||
|
||||
git_ver = _LooseVersion(__salt__['git.version'](versioninfo=False))
|
||||
if git_ver >= _LooseVersion('1.7.12'):
|
||||
if git_ver >= _LooseVersion('1.8.0'):
|
||||
set_upstream = '--set-upstream-to'
|
||||
else:
|
||||
# Older git uses --track instead of --set-upstream-to
|
||||
|
Loading…
Reference in New Issue
Block a user