| |
@@ -71,8 +71,8 @@
|
| |
If url is not in the list of allowed_scm, an error will be raised.
|
| |
|
| |
:param str url: The unmodified scmurl
|
| |
- :param str branch: The optional source control branch. This defaults to "master" when git
|
| |
- is used.
|
| |
+ :param str branch: The optional source control branch. This defaults to the default_branch
|
| |
+ config option when git is used.
|
| |
:param list allowed_scm: The optional list of allowed SCM URL prefixes
|
| |
:param bool allow_local: Allow SCM URLs that start with "file://"
|
| |
:raises: Forbidden or ValidationError
|
| |
@@ -111,7 +111,7 @@
|
| |
if self.name.endswith(".git"):
|
| |
self.name = self.name[:-4]
|
| |
self.commit = match.group("commit")
|
| |
- self.branch = branch if branch else "master"
|
| |
+ self.branch = branch if branch else conf.default_branch
|
| |
self.version = None
|
| |
self._cloned = False
|
| |
else:
|
| |
Fixes: #1735