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:
Justin Findlay 2015-09-02 14:51:43 -06:00
commit a21b3f4cad
2 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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