Commit 94446fa8 authored by Benjamin Blanc's avatar Benjamin Blanc Committed by Cédric de Saint Martin

gitclone: do not force to use 'master' branch when not specified.

This commit in order to prevent fail when only revision is specified
and remote depository do not have 'master' branch.
parent 98b41860
......@@ -126,7 +126,7 @@ class Recipe(object):
options.setdefault('location',
os.path.join(buildout['buildout']['parts-directory'], name))
self.repository = options.get('repository')
self.branch = options.get('branch', GIT_DEFAULT_BRANCH_NAME)
self.branch = options.get('branch')
self.revision = options.get('revision')
self.git_command = options.get('git-executable', 'git')
self.name = name
......@@ -140,7 +140,7 @@ class Recipe(object):
# Check if input is correct
if not self.repository:
raise UserError('repository parameter is mandatory.')
if self.revision and self.branch != GIT_DEFAULT_BRANCH_NAME:
if self.revision and self.branch:
# revision and branch options are incompatible
raise UserError('revision and branch (other than master) parameters '
'are set but are incompatible. Please specify only one of them.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment