summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/project.py b/project.py
index 46f3b8f7..a1249a86 100644
--- a/project.py
+++ b/project.py
@@ -1661,6 +1661,13 @@ class Project(object):
1661 # There is no such persistent revision. We have to fetch it. 1661 # There is no such persistent revision. We have to fetch it.
1662 return False 1662 return False
1663 1663
1664 if self.clone_depth:
1665 depth = self.clone_depth
1666 else:
1667 depth = self.manifest.manifestProject.config.GetString('repo.depth')
1668 if depth:
1669 current_branch_only = True
1670
1664 if current_branch_only: 1671 if current_branch_only:
1665 if ID_RE.match(self.revisionExpr) is not None: 1672 if ID_RE.match(self.revisionExpr) is not None:
1666 is_sha1 = True 1673 is_sha1 = True
@@ -1724,10 +1731,6 @@ class Project(object):
1724 1731
1725 # The --depth option only affects the initial fetch; after that we'll do 1732 # The --depth option only affects the initial fetch; after that we'll do
1726 # full fetches of changes. 1733 # full fetches of changes.
1727 if self.clone_depth:
1728 depth = self.clone_depth
1729 else:
1730 depth = self.manifest.manifestProject.config.GetString('repo.depth')
1731 if depth and initial: 1734 if depth and initial:
1732 cmd.append('--depth=%s' % depth) 1735 cmd.append('--depth=%s' % depth)
1733 1736