From 23c4defd8db6a23cca8de19d1e1625eb40420349 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Wed, 1 Nov 2023 20:07:13 +0000 Subject: [PATCH] fetch: stop setting submodules config as we are not using it at all R=sokcevic Bug: 1496925 Change-Id: I448fb1f49b225d1a5f60103dbbcacaea2c69bd9a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4995365 Auto-Submit: Yiwei Zhang Reviewed-by: Josip Sokcevic Commit-Queue: Josip Sokcevic --- fetch.py | 5 ----- tests/fetch_test.py | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fetch.py b/fetch.py index cd4a4641d..3fcbc5e8b 100755 --- a/fetch.py +++ b/fetch.py @@ -146,11 +146,6 @@ class GclientGitCheckout(GclientCheckout, GitCheckout): wd = os.path.join(self.base, self.root) if self.options.dry_run: print('cd %s' % wd) - self.run_git( - 'submodule', - 'foreach', - 'git config -f $toplevel/.git/config submodule.$name.ignore all', - cwd=wd) if not self.options.nohistory: self.run_git('config', '--add', diff --git a/tests/fetch_test.py b/tests/fetch_test.py index 8e961677e..579048771 100755 --- a/tests/fetch_test.py +++ b/tests/fetch_test.py @@ -254,13 +254,13 @@ class TestGclientGitCheckout(unittest.TestCase): def test_init(self): self.checkout.init() self.assertEqual(2, self.run_gclient.call_count) - self.assertEqual(3, self.run_git.call_count) + self.assertEqual(2, self.run_git.call_count) # Verify only expected commands and ignore arguments to avoid copying # commands from fetch.py self.assertEqual(['config', 'sync'], [a[0][0] for a in self.run_gclient.call_args_list]) - self.assertEqual(['submodule', 'config', 'config'], + self.assertEqual(['config', 'config'], [a[0][0] for a in self.run_git.call_args_list]) # First call to gclient, format spec is expected to be called so "foo"