summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-05-20 16:03:45 -0700
committerJonathan Nieder <jrn@google.com>2020-05-21 19:47:36 +0000
commitd79a4bc51b6ca5b47bbea861143c72bccc0ad13a (patch)
treef2d8de86fc76c9207af7be2b0c7ff683471df761 /manifest_xml.py
parent682f0b6426a06ed1e89b130d50c6521b1c67d529 (diff)
downloadgit-repo-d79a4bc51b6ca5b47bbea861143c72bccc0ad13a.tar.gz
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 <delphij@google.com> Reviewed-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index b2918cac..b6aef510 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -502,6 +502,14 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
502 return self._manifest_server 502 return self._manifest_server
503 503
504 @property 504 @property
505 def CloneBundle(self):
506 clone_bundle = self.manifestProject.config.GetBoolean('repo.clonebundle')
507 if clone_bundle is None:
508 return False if self.manifestProject.config.GetBoolean('repo.partialclone') else True
509 else:
510 return clone_bundle
511
512 @property
505 def CloneFilter(self): 513 def CloneFilter(self):
506 if self.manifestProject.config.GetBoolean('repo.partialclone'): 514 if self.manifestProject.config.GetBoolean('repo.partialclone'):
507 return self.manifestProject.config.GetString('repo.clonefilter') 515 return self.manifestProject.config.GetString('repo.clonefilter')