Skip to content

Commit badc18f

Browse files
committed
let git to respect cargo's verbosity
1 parent 1cd6d38 commit badc18f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cargo/sources/git/utils.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Utilities for handling git repositories, mainly around
22
//! authentication/cloning.
33
4-
use crate::core::GitReference;
4+
use crate::core::{GitReference, Verbosity};
55
use crate::util::errors::CargoResult;
66
use crate::util::{human_readable_bytes, network, Config, IntoUrl, MetricsCounter, Progress};
77
use anyhow::{anyhow, Context as _};
@@ -933,6 +933,15 @@ fn fetch_with_cli(
933933
if tags {
934934
cmd.arg("--tags");
935935
}
936+
match config.shell().verbosity() {
937+
Verbosity::Normal => {}
938+
Verbosity::Verbose => {
939+
cmd.arg("--verbose");
940+
}
941+
Verbosity::Quiet => {
942+
cmd.arg("--quiet");
943+
}
944+
}
936945
cmd.arg("--force") // handle force pushes
937946
.arg("--update-head-ok") // see discussion in #2078
938947
.arg(url)

0 commit comments

Comments
 (0)