From d79a4bc51b6ca5b47bbea861143c72bccc0ad13a Mon Sep 17 00:00:00 2001 From: Xin Li Date: Wed, 20 May 2020 16:03:45 -0700 Subject: Make partial clone imply no-clone-bundle by default. For large projects, clone bundle is useful because it provided a way to efficiently transfer a large portion of git objects through CDN, without needing to interact with git server. However, with partial clones, the intention is to not download most of the objects, so the use of clone bundles would defeat the space savings normally seen with partial clones, as they are downloaded before the first fetch. A new option, --clone-bundle is added to override this behavior. Add a new repo.clonebundle variable which remembers the choice if explicitly given from command line at repo init. Change-Id: I03638474af303a82af34579e16cd4700690b5f43 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/268452 Tested-by: Xin Li Reviewed-by: Jonathan Nieder --- manifest_xml.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index b2918cac..b6aef510 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -501,6 +501,14 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md self._Load() return self._manifest_server + @property + def CloneBundle(self): + clone_bundle = self.manifestProject.config.GetBoolean('repo.clonebundle') + if clone_bundle is None: + return False if self.manifestProject.config.GetBoolean('repo.partialclone') else True + else: + return clone_bundle + @property def CloneFilter(self): if self.manifestProject.config.GetBoolean('repo.partialclone'): -- cgit v1.2.3-54-g00ecf