Jelajahi Sumber

[win-bootstrap] Include manual instructions in git bootstrap warning

Bug: b/382395049
Change-Id: I61aab102f68b2a30d1095e89d2d3b9ee46aa8480
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6072989
Commit-Queue: Anne Redulla <aredulla@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Anne Redulla 8 bulan lalu
induk
melakukan
dfa51ea88b
1 mengubah file dengan 11 tambahan dan 3 penghapusan
  1. 11 3
      bootstrap/bootstrap.py

+ 11 - 3
bootstrap/bootstrap.py

@@ -415,13 +415,21 @@ def _win_git_bootstrap_config():
 
 
     if allow_global not in ('true', '1', 'yes', 'on'):
     if allow_global not in ('true', '1', 'yes', 'on'):
         lines = [
         lines = [
-            'depot_tools would like to update your global Git config',
-            'to have the optimal settings for Chromium development.',
+            'depot_tools recommends setting the following for',
+            'optimal Chromium development:',
+            '',
+        ] + [
+            f'$ git config --global {k} {GIT_GLOBAL_CONFIG.get(k)}'
+            for k in mismatching_keys
+        ] + [
+            '',
+            'You can silence this message by setting these recommended values.',
+            '',
             'You can allow depot_tools to automatically update your global',
             'You can allow depot_tools to automatically update your global',
             'Git config to recommended settings by running:',
             'Git config to recommended settings by running:',
             f'$ git config --global {allow_global_key} true',
             f'$ git config --global {allow_global_key} true',
             '',
             '',
-            'To suppress this warning:',
+            'To suppress this warning and silence future recommendations, run:',
             f'$ git config --global {allow_global_key} false',
             f'$ git config --global {allow_global_key} false',
         ]
         ]