From ef267722f8025e547136a6b54dd97dc73b0b3dd2 Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Mon, 1 Feb 2021 12:37:35 -0800 Subject: [PATCH] sync: Added --filter=blob:none for git clone of superproject. + This is without --depth option. This is done for reachability. Server doesn't know what you know about in the history so it always sends you the whole thing Which is very slow. If we have the full history it can send you incremental update history which is very small and fast. Tested the code with the following commands. $ ./run_tests -v tests/test_git_superproject.py $ ./run_tests -v Tested the sync code by copying all the repo changes into my Android AOSP checkout and doing a repo sync --use-superproject twice. .../WORKING_DIRECTORY$ repo sync --use-superproject Bug: https://crbug.com/gerrit/13709 Bug: https://crbug.com/gerrit/13707 Tested-by: Raman Tenneti Change-Id: I239de6d8f1c2ed6b4c69e7a78b8aa95338fa838c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/295362 Reviewed-by: Mike Frysinger --- git_superproject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_superproject.py b/git_superproject.py index 157a1fbb..e2045cfd 100644 --- a/git_superproject.py +++ b/git_superproject.py @@ -63,7 +63,7 @@ class Superproject(object): True if 'git clone ' is successful, or False. """ os.mkdir(self._superproject_path) - cmd = ['clone', url, '--depth', '1'] + cmd = ['clone', url, '--filter', 'blob:none'] if branch: cmd += ['--branch', branch] p = GitCommand(None,