Set depth as 50
@@ -35,6 +35,7 @@ class Backend(BaseVCS):
supports_branches = True
supports_submodules = True
fallback_branch = 'master' # default branch
+ repo_depth = 50
def __init__(self, *args, **kwargs):
super(Backend, self).__init__(*args, **kwargs)
@@ -131,7 +132,8 @@ class Backend(BaseVCS):
def fetch(self):
code, stdout, stderr = self.run(
- 'git', 'fetch', '--depth=1', '--tags', '--prune', '--prune-tags',
+ 'git', 'fetch', '--depth', str(self.repo_depth),
+ '--tags', '--prune', '--prune-tags',
)
if code != 0:
raise RepositoryError
@@ -150,8 +152,8 @@ class Backend(BaseVCS):
def clone(self):
"""Clones the repository."""
code, stdout, stderr = self.run(
- 'git', 'clone', '--depth=1', '--no-single-branch',
- self.repo_url, '.'
+ 'git', 'clone', '--depth', str(self.repo_depth),
+ '--no-single-branch', self.repo_url, '.'
)
if code != 0:
raise RepositoryError
