Skip to content

Commit

Permalink
Merge pull request #26858 from terminalmage/git-latest-version-check
Browse files Browse the repository at this point in the history
Fix a couple version checks for git state and execution module
  • Loading branch information
jfindlay committed Sep 2, 2015
2 parents 4c1abe4 + 4ac3882 commit a21b3f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions salt/modules/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion salt/states/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a21b3f4

Please sign in to comment.