mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Merge "Ignore clone-depth attribute when fetching to a mirror"
This commit is contained in:
commit
544e7b0a97
14
project.py
14
project.py
@ -1716,11 +1716,17 @@ class Project(object):
|
||||
|
||||
is_sha1 = False
|
||||
tag_name = None
|
||||
depth = None
|
||||
|
||||
# The depth should not be used when fetching to a mirror because
|
||||
# it will result in a shallow repository that cannot be cloned or
|
||||
# fetched from.
|
||||
if not self.manifest.IsMirror:
|
||||
if self.clone_depth:
|
||||
depth = self.clone_depth
|
||||
else:
|
||||
depth = self.manifest.manifestProject.config.GetString('repo.depth')
|
||||
|
||||
if self.clone_depth:
|
||||
depth = self.clone_depth
|
||||
else:
|
||||
depth = self.manifest.manifestProject.config.GetString('repo.depth')
|
||||
if depth:
|
||||
current_branch_only = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user