diff options
author | Conley Owens <cco3@android.com> | 2014-01-29 21:12:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-01-29 21:12:34 +0000 |
commit | c9877c7cf677bc3db18e9003271dfd72383aa9f7 (patch) | |
tree | 2fe37c556e7c92d8e7a0809ad3ec3a8242e3b750 | |
parent | f1f1137d619dfffe23fd15b8754d067fe1e353b8 (diff) | |
parent | 69e04d89538e4a253efe7d9f4fd1f1ae70f8f62c (diff) | |
download | git-repo-c9877c7cf677bc3db18e9003271dfd72383aa9f7.tar.gz |
Merge "Only fetch current branch on shallow clients"v1.12.8
-rw-r--r-- | project.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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 | ||