diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1593,6 +1593,13 @@ class Project(object): | |||
1593 | # There is no such persistent revision. We have to fetch it. | 1593 | # There is no such persistent revision. We have to fetch it. |
1594 | return False | 1594 | return False |
1595 | 1595 | ||
1596 | if self.clone_depth: | ||
1597 | depth = self.clone_depth | ||
1598 | else: | ||
1599 | depth = self.manifest.manifestProject.config.GetString('repo.depth') | ||
1600 | if depth: | ||
1601 | current_branch_only = True | ||
1602 | |||
1596 | if current_branch_only: | 1603 | if current_branch_only: |
1597 | if ID_RE.match(self.revisionExpr) is not None: | 1604 | if ID_RE.match(self.revisionExpr) is not None: |
1598 | is_sha1 = True | 1605 | is_sha1 = True |
@@ -1656,10 +1663,6 @@ class Project(object): | |||
1656 | 1663 | ||
1657 | # The --depth option only affects the initial fetch; after that we'll do | 1664 | # The --depth option only affects the initial fetch; after that we'll do |
1658 | # full fetches of changes. | 1665 | # full fetches of changes. |
1659 | if self.clone_depth: | ||
1660 | depth = self.clone_depth | ||
1661 | else: | ||
1662 | depth = self.manifest.manifestProject.config.GetString('repo.depth') | ||
1663 | if depth and initial: | 1666 | if depth and initial: |
1664 | cmd.append('--depth=%s' % depth) | 1667 | cmd.append('--depth=%s' % depth) |
1665 | 1668 | ||