From b4382c66d9fa2d6f0edbe655aebb6424eecc109d Mon Sep 17 00:00:00 2001 From: Anne Redulla Date: Tue, 10 Dec 2024 07:36:11 +0000 Subject: [PATCH] [win-bootstrap] Only update mismatching settings in global git config Change-Id: I781a2b6cb11f8a13f4555bffc522f8dd85c40351 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6073289 Reviewed-by: Allen Li Commit-Queue: Anne Redulla Reviewed-by: Josip Sokcevic --- bootstrap/bootstrap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py index 01a1b7acf..44c2bbeb1 100644 --- a/bootstrap/bootstrap.py +++ b/bootstrap/bootstrap.py @@ -436,9 +436,10 @@ def _win_git_bootstrap_config(): logging.warning('\n'.join(lines)) return - # Global git config changes have been authorized - do the update. - for k, v in GIT_GLOBAL_CONFIG.items(): - _check_call([git_bat_path, 'config', '--global', k, v]) + # Global git config changes have been authorized - do the necessary updates. + for k in mismatching_keys: + desired = GIT_GLOBAL_CONFIG.get(k) + _check_call([git_bat_path, 'config', '--global', k, desired]) # Clean up deprecated setting depot-tools.gitPostprocessVersion. postprocess_key = 'depot-tools.gitPostprocessVersion'