diff --git a/BREAKINGCHANGES_dev.md b/BREAKINGCHANGES_dev.md index 1ecdf63a..15a16c2f 100644 --- a/BREAKINGCHANGES_dev.md +++ b/BREAKINGCHANGES_dev.md @@ -1,4 +1,9 @@ -# Configutation +# Git: Pull Repos + +1. The output of "Pulling " has been moved behind the +--verbose flag / [misc] configuration block. + +# Configuration 1. The `enable_winget` configuration entry in the `windows` section has been removed because it will not cause any issues and will be enabled by default. diff --git a/config.example.toml b/config.example.toml index 07d96ae2..ea29912b 100644 --- a/config.example.toml +++ b/config.example.toml @@ -109,7 +109,7 @@ # greedy_cask = true # For the BrewCask step -# If `Repo Cask Upgrade` does not exist, then use the `--greedy_latest` optoin. +# If `Repo Cask Upgrade` does not exist, then use the `--greedy_latest` option. # NOTE: the above entry `greedy_cask` contains this entry, though you can enable # both of them, they won't clash with each other. # greedy_latest = true diff --git a/src/steps/git.rs b/src/steps/git.rs index 3c187ee9..7988aed4 100644 --- a/src/steps/git.rs +++ b/src/steps/git.rs @@ -295,7 +295,9 @@ impl RepoStep { async fn pull_repo>(&self, ctx: &ExecutionContext<'_>, repo: P) -> Result<()> { let before_revision = get_head_revision(&self.git, &repo); - println!("{} {}", style("Pulling").cyan().bold(), repo.as_ref().display()); + if ctx.config().verbose() { + println!("{} {}", style("Pulling").cyan().bold(), repo.as_ref().display()); + } let mut command = AsyncCommand::new(&self.git); @@ -326,7 +328,7 @@ impl RepoStep { match (&before_revision, &after_revision) { (Some(before), Some(after)) if before != after => { - println!("{} {}:", style("Changed").yellow().bold(), repo.as_ref().display()); + println!("{} {}", style("Changed").yellow().bold(), repo.as_ref().display()); Command::new(&self.git) .stdin(Stdio::null()) @@ -342,7 +344,9 @@ impl RepoStep { println!(); } _ => { - println!("{} {}", style("Up-to-date").green().bold(), repo.as_ref().display()); + if ctx.config().verbose() { + println!("{} {}", style("Up-to-date").green().bold(), repo.as_ref().display()); + } } } } @@ -364,6 +368,13 @@ impl RepoStep { return Ok(()); } + if !ctx.config().verbose() { + println!( + "\n{} updated repositories will be shown...\n", + style("Only").green().bold() + ); + } + let futures_iterator = self .repos .iter()