Skip to content

Commit

Permalink
Shallow clone
Browse files Browse the repository at this point in the history
Close #1888
  • Loading branch information
stsewd committed Nov 29, 2018
1 parent b15e5d3 commit e103d29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions readthedocs/vcs_support/backends/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def validate_submodules(self, config):

def fetch(self):
code, stdout, stderr = self.run(
'git', 'fetch', '--tags', '--prune', '--prune-tags',
'git', 'fetch', '--depth=1', '--tags', '--prune', '--prune-tags',
)
if code != 0:
raise RepositoryError
Expand All @@ -150,7 +150,8 @@ def checkout_revision(self, revision=None):
def clone(self):
"""Clones the repository."""
code, stdout, stderr = self.run(
'git', 'clone', self.repo_url, '.'
'git', 'clone', '--depth=1', '--no-single-branch',
self.repo_url, '.'
)
if code != 0:
raise RepositoryError
Expand Down

0 comments on commit e103d29

Please sign in to comment.