Merge pull request #9195 from basepi/gitlatestargs9107

Add checking for rev and mirror/bare args in git.latest, Fix #9107
This commit is contained in:
Thomas S Hatch 2013-12-11 16:00:31 -08:00
commit 9e715bb7c8

View File

@ -111,6 +111,12 @@ def latest(name,
passed to the ``unless`` option returns false
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
# Check to make sure rev and mirror/bare are not both in use
if rev and (mirror or bare):
return _fail(ret, ('"rev" is not compatible with the "mirror" and'
'"bare" arguments'))
if not target:
return _fail(ret, '"target" option is required')