repo: Use --verbose by default

Bug: b/252818963
Change-Id: Id7b07402516cc534b95b5d5bd9b02a9637643c3e
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/125090
Commit-Queue: Rob Mohr <mohrr@google.com>
Reviewed-by: Marc-Antoine Ruel <maruel@google.com>
diff --git a/recipe_modules/checkout/tests/repo.expected/ci.json b/recipe_modules/checkout/tests/repo.expected/ci.json
index 441b162..bf31d97 100644
--- a/recipe_modules/checkout/tests/repo.expected/ci.json
+++ b/recipe_modules/checkout/tests/repo.expected/ci.json
@@ -661,7 +661,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/feature_branches_ci.json b/recipe_modules/checkout/tests/repo.expected/feature_branches_ci.json
index 1172be0..8dea61b 100644
--- a/recipe_modules/checkout/tests/repo.expected/feature_branches_ci.json
+++ b/recipe_modules/checkout/tests/repo.expected/feature_branches_ci.json
@@ -626,7 +626,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/feature_branches_try.json b/recipe_modules/checkout/tests/repo.expected/feature_branches_try.json
index 71f9242..8ab26e4 100644
--- a/recipe_modules/checkout/tests/repo.expected/feature_branches_try.json
+++ b/recipe_modules/checkout/tests/repo.expected/feature_branches_try.json
@@ -838,7 +838,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/feature_branches_try_multiple_features.json b/recipe_modules/checkout/tests/repo.expected/feature_branches_try_multiple_features.json
index 8e5a6b7..86ab28a 100644
--- a/recipe_modules/checkout/tests/repo.expected/feature_branches_try_multiple_features.json
+++ b/recipe_modules/checkout/tests/repo.expected/feature_branches_try_multiple_features.json
@@ -948,7 +948,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/feature_branches_try_no_matching.json b/recipe_modules/checkout/tests/repo.expected/feature_branches_try_no_matching.json
index f5785b0..e3edc9f 100644
--- a/recipe_modules/checkout/tests/repo.expected/feature_branches_try_no_matching.json
+++ b/recipe_modules/checkout/tests/repo.expected/feature_branches_try_no_matching.json
@@ -857,7 +857,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/no_trigger.json b/recipe_modules/checkout/tests/repo.expected/no_trigger.json
index c753ded..d16bfcc 100644
--- a/recipe_modules/checkout/tests/repo.expected/no_trigger.json
+++ b/recipe_modules/checkout/tests/repo.expected/no_trigger.json
@@ -661,7 +661,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/prefix.json b/recipe_modules/checkout/tests/repo.expected/prefix.json
index 43a414f..8f841395 100644
--- a/recipe_modules/checkout/tests/repo.expected/prefix.json
+++ b/recipe_modules/checkout/tests/repo.expected/prefix.json
@@ -785,7 +785,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try-multiple-cqdeps.json b/recipe_modules/checkout/tests/repo.expected/try-multiple-cqdeps.json
index ce65bd5..7fb209a 100644
--- a/recipe_modules/checkout/tests/repo.expected/try-multiple-cqdeps.json
+++ b/recipe_modules/checkout/tests/repo.expected/try-multiple-cqdeps.json
@@ -1030,7 +1030,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try-multiple-onenotapplied.json b/recipe_modules/checkout/tests/repo.expected/try-multiple-onenotapplied.json
index 6b03e51..a3194cc 100644
--- a/recipe_modules/checkout/tests/repo.expected/try-multiple-onenotapplied.json
+++ b/recipe_modules/checkout/tests/repo.expected/try-multiple-onenotapplied.json
@@ -930,7 +930,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try-multiple.json b/recipe_modules/checkout/tests/repo.expected/try-multiple.json
index e584c26..af6ebb6 100644
--- a/recipe_modules/checkout/tests/repo.expected/try-multiple.json
+++ b/recipe_modules/checkout/tests/repo.expected/try-multiple.json
@@ -857,7 +857,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try.json b/recipe_modules/checkout/tests/repo.expected/try.json
index 0391375..e7bd2d1 100644
--- a/recipe_modules/checkout/tests/repo.expected/try.json
+++ b/recipe_modules/checkout/tests/repo.expected/try.json
@@ -787,7 +787,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try_manifest.json b/recipe_modules/checkout/tests/repo.expected/try_manifest.json
index 92631bd..f593109 100644
--- a/recipe_modules/checkout/tests/repo.expected/try_manifest.json
+++ b/recipe_modules/checkout/tests/repo.expected/try_manifest.json
@@ -1212,7 +1212,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/checkout/tests/repo.expected/try_repo_not_in_manifest.json b/recipe_modules/checkout/tests/repo.expected/try_repo_not_in_manifest.json
index a6527d0..21ffb40 100644
--- a/recipe_modules/checkout/tests/repo.expected/try_repo_not_in_manifest.json
+++ b/recipe_modules/checkout/tests/repo.expected/try_repo_not_in_manifest.json
@@ -785,7 +785,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,
diff --git a/recipe_modules/repo/api.py b/recipe_modules/repo/api.py
index 33fa707..d0d20ca 100644
--- a/recipe_modules/repo/api.py
+++ b/recipe_modules/repo/api.py
@@ -205,6 +205,7 @@
         cache_dir=None,
         timeout=None,
         attempts=1,
+        verbose=True,
         **kwargs,
     ):
         """Executes 'repo sync' with the given arguments.
@@ -221,6 +222,7 @@
       cache_dir (Path): Use git-cache with this cache directory.
       timeout (int): Timeout in seconds.
       attempts (int): Number of attempts.
+      verbose (bool): Show all output.
       **kwargs: Passed through to self.m.step().
     """
         assert (
@@ -245,6 +247,8 @@
             cmd += ['--optimized-fetch']
         if cache_dir is not None:
             cmd += ['--cache-dir', cache_dir]
+        if verbose:
+            cmd += ['--verbose']
 
         # Doing retry logic here instead of using that in _step() because we
         # need to clean up the checkout or we sometimes get inconsistent
diff --git a/recipe_modules/repo/examples/full.expected/setup_repo.json b/recipe_modules/repo/examples/full.expected/setup_repo.json
index b280dfa..f14acc3 100644
--- a/recipe_modules/repo/examples/full.expected/setup_repo.json
+++ b/recipe_modules/repo/examples/full.expected/setup_repo.json
@@ -122,7 +122,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/checkout",
     "infra_step": true,
@@ -142,7 +143,8 @@
       "--no-tags",
       "--optimized-fetch",
       "--cache-dir",
-      "/tmp/cache"
+      "/tmp/cache",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/checkout",
     "infra_step": true,
@@ -168,7 +170,8 @@
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
       "sync",
       "--manifest-name",
-      "../../../../[CLEANUP]/manifest_tmp_1"
+      "../../../../[CLEANUP]/manifest_tmp_1",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/checkout",
     "infra_step": true,
@@ -421,7 +424,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "cwd": "[CLEANUP]/ensure",
     "infra_step": true,
diff --git a/recipe_modules/repo/examples/init_sync_retry.expected/fail-fail.json b/recipe_modules/repo/examples/init_sync_retry.expected/fail-fail.json
index d5d2ac6..12381d5 100644
--- a/recipe_modules/repo/examples/init_sync_retry.expected/fail-fail.json
+++ b/recipe_modules/repo/examples/init_sync_retry.expected/fail-fail.json
@@ -54,7 +54,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "infra_step": true,
     "name": "repo sync",
@@ -75,7 +76,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "infra_step": true,
     "name": "repo sync (2)",
diff --git a/recipe_modules/repo/examples/init_sync_retry.expected/fail-pass.json b/recipe_modules/repo/examples/init_sync_retry.expected/fail-pass.json
index a8f26fb..2aa5daa 100644
--- a/recipe_modules/repo/examples/init_sync_retry.expected/fail-pass.json
+++ b/recipe_modules/repo/examples/init_sync_retry.expected/fail-pass.json
@@ -54,7 +54,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "infra_step": true,
     "name": "repo sync",
@@ -75,7 +76,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "infra_step": true,
     "name": "repo sync (2)"
diff --git a/recipe_modules/repo/examples/repo_retry_failure.expected/repo_retry_failure.json b/recipe_modules/repo/examples/repo_retry_failure.expected/repo_retry_failure.json
index 10cf4b4..69d6616 100644
--- a/recipe_modules/repo/examples/repo_retry_failure.expected/repo_retry_failure.json
+++ b/recipe_modules/repo/examples/repo_retry_failure.expected/repo_retry_failure.json
@@ -246,7 +246,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "cwd": "[CLEANUP]/ensure",
     "infra_step": true,
diff --git a/recipe_modules/repo/examples/repo_retry_success.expected/repo_retry_success.json b/recipe_modules/repo/examples/repo_retry_success.expected/repo_retry_success.json
index b82f954..4d07e39 100644
--- a/recipe_modules/repo/examples/repo_retry_success.expected/repo_retry_success.json
+++ b/recipe_modules/repo/examples/repo_retry_success.expected/repo_retry_success.json
@@ -246,7 +246,8 @@
   {
     "cmd": [
       "RECIPE_MODULE[pigweed::repo]/resources/repo",
-      "sync"
+      "sync",
+      "--verbose"
     ],
     "cwd": "[CLEANUP]/ensure",
     "infra_step": true,
diff --git a/recipes/target_to_cipd.expected/success.json b/recipes/target_to_cipd.expected/success.json
index 208a42d..5975a1b 100644
--- a/recipes/target_to_cipd.expected/success.json
+++ b/recipes/target_to_cipd.expected/success.json
@@ -894,7 +894,8 @@
       "--force-sync",
       "--current-branch",
       "--jobs",
-      "2"
+      "2",
+      "--verbose"
     ],
     "cwd": "[START_DIR]/co",
     "infra_step": true,