diff --git a/git_cache.py b/git_cache.py index 1c5a1fe38..a402fc278 100755 --- a/git_cache.py +++ b/git_cache.py @@ -509,7 +509,7 @@ class Mirror(object): self._fetch(self.mirror_path, verbose, depth, no_fetch_tags, reset_fetch_config) - def update_bootstrap(self, prune=False, gc_aggressive=False, branch='main'): + def update_bootstrap(self, prune=False, gc_aggressive=False): # NOTE: There have been cases where repos were being recursively uploaded # to google storage. # E.g. `-//-/` in GS and @@ -524,9 +524,9 @@ class Mirror(object): gclient_utils.rmtree(recursed_dir) # The folder is - gen_number = subprocess.check_output( - [self.git_exe, 'number', branch], - cwd=self.mirror_path).decode('utf-8', 'ignore').strip() + gen_number = subprocess.check_output([self.git_exe, 'number'], + cwd=self.mirror_path).decode( + 'utf-8', 'ignore').strip() gsutil = Gsutil(path=self.gsutil_exe, boto_path=None) dest_prefix = '%s/%s' % (self._gs_path, gen_number) @@ -655,8 +655,6 @@ def CMDupdate_bootstrap(parser, args): help='Run aggressive repacking of the repo.') parser.add_option('--prune', action='store_true', help='Prune all other cached bundles of the same repo.') - parser.add_option('--branch', default='main', - help='Branch to use for bootstrap. (Default \'main\')') populate_args = args[:] options, args = parser.parse_args(args) @@ -671,7 +669,7 @@ def CMDupdate_bootstrap(parser, args): _, args2 = parser.parse_args(args) url = args2[0] mirror = Mirror(url) - mirror.update_bootstrap(options.prune, options.gc_aggressive, options.branch) + mirror.update_bootstrap(options.prune, options.gc_aggressive) return 0