diff options
| author | Conley Owens <cco3@android.com> | 2014-04-24 21:21:01 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-24 21:21:02 +0000 |
| commit | 544e7b0a9774a6366b6a06d25992c46fd5d4f31f (patch) | |
| tree | 4c242f5667a949ec6d76d19e0d0f810ed06e7874 | |
| parent | e0df232da7c92b0776a3e86a70687e2c9f2bad7b (diff) | |
| parent | 9bc422f1301a54aaabc6ac279989970c4b6f5137 (diff) | |
| download | git-repo-544e7b0a9774a6366b6a06d25992c46fd5d4f31f.tar.gz | |
Merge "Ignore clone-depth attribute when fetching to a mirror"v1.12.14
| -rw-r--r-- | project.py | 14 |
1 files changed, 10 insertions, 4 deletions
| @@ -1716,11 +1716,17 @@ class Project(object): | |||
| 1716 | 1716 | ||
| 1717 | is_sha1 = False | 1717 | is_sha1 = False |
| 1718 | tag_name = None | 1718 | tag_name = None |
| 1719 | depth = None | ||
| 1720 | |||
| 1721 | # The depth should not be used when fetching to a mirror because | ||
| 1722 | # it will result in a shallow repository that cannot be cloned or | ||
| 1723 | # fetched from. | ||
| 1724 | if not self.manifest.IsMirror: | ||
| 1725 | if self.clone_depth: | ||
| 1726 | depth = self.clone_depth | ||
| 1727 | else: | ||
| 1728 | depth = self.manifest.manifestProject.config.GetString('repo.depth') | ||
| 1719 | 1729 | ||
| 1720 | if self.clone_depth: | ||
| 1721 | depth = self.clone_depth | ||
| 1722 | else: | ||
| 1723 | depth = self.manifest.manifestProject.config.GetString('repo.depth') | ||
| 1724 | if depth: | 1730 | if depth: |
| 1725 | current_branch_only = True | 1731 | current_branch_only = True |
| 1726 | 1732 | ||
