From b26059ac4549b1ba47c86dc25ea83947bf0becac Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Wed, 21 Feb 2024 19:45:59 +0000 Subject: [PATCH] [git_cache] Fix shadowing for `bootstrap` The `bootstrap` function within `populate` is shadowing the `bootstrap` argument. This causes the `_ensure_bootsrapped` function to receive a function pointer rather than passing along the boolean value. Bug: 326116358 Change-Id: I6c03eb8bfbbc3385e1e9e653e43fdf9416cd244f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5310976 Reviewed-by: Josip Sokcevic Commit-Queue: Josip Sokcevic Auto-Submit: Kyle Farnung --- git_cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git_cache.py b/git_cache.py index c5cf6aa10..32245455c 100755 --- a/git_cache.py +++ b/git_cache.py @@ -555,7 +555,7 @@ class Mirror(object): depth = 10000 gclient_utils.safe_makedirs(self.GetCachePath()) - def bootstrap(force=False): + def bootstrap_cache(force=False): self._ensure_bootstrapped(depth, bootstrap, reset_fetch_config, @@ -572,12 +572,12 @@ class Mirror(object): wipe_cache() try: - bootstrap() + bootstrap_cache() except ClobberNeeded: # This is a major failure, we need to clean and force a # bootstrap. wipe_cache() - bootstrap(force=True) + bootstrap_cache(force=True) def update_bootstrap(self, prune=False, gc_aggressive=False): # NOTE: There have been cases where repos were being recursively