diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index ab2f080a18f..c4449802f26 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1928,7 +1928,6 @@ def add_features(sender, **kwargs): # may be added by other packages MKDOCS_THEME_RTD = "mkdocs_theme_rtd" API_LARGE_DATA = "api_large_data" - DONT_SHALLOW_CLONE = "dont_shallow_clone" CONDA_APPEND_CORE_REQUIREMENTS = "conda_append_core_requirements" ALL_VERSIONS_IN_HTML_CONTEXT = "all_versions_in_html_context" CDN_ENABLED = "cdn_enabled" @@ -1969,10 +1968,6 @@ def add_features(sender, **kwargs): MKDOCS_THEME_RTD, _("MkDocs: Use Read the Docs theme for MkDocs as default theme"), ), - ( - DONT_SHALLOW_CLONE, - _("Build: Do not shallow clone when cloning git repos"), - ), ( API_LARGE_DATA, _("Build: Try alternative method of posting large data"), diff --git a/readthedocs/vcs_support/backends/git.py b/readthedocs/vcs_support/backends/git.py index f44533b8557..9893eb5468b 100644 --- a/readthedocs/vcs_support/backends/git.py +++ b/readthedocs/vcs_support/backends/git.py @@ -148,6 +148,7 @@ def get_remote_fetch_refspec(self): ) def clone(self): + """Clones the repository.""" # TODO: We should add "--no-checkout" in all git clone operations, except: # There exists a case of version_type=BRANCH without a branch name. # This case is relevant for building projects for the first time without knowing the name @@ -268,19 +269,6 @@ def validate_submodules(self, config): return False, invalid_submodules return True, submodules.keys() - def use_shallow_clone(self): - """ - Test whether shallow clone should be performed. - - .. note:: - - Temporarily, we support skipping this option as builds that rely on - git history can fail if using shallow clones. This should - eventually be configurable via the web UI. - """ - from readthedocs.projects.models import Feature - return not self.project.has_feature(Feature.DONT_SHALLOW_CLONE) - def checkout_revision(self, revision): try: code, out, err = self.run('git', 'checkout', '--force', revision)