path: root/builtin/clone.c
diff options
authorJeff King <>2013-09-18 20:06:50 (GMT)
committerJunio C Hamano <>2013-09-18 20:34:46 (GMT)
commit2856cbf0ae604c233e7dc62ba7931a469165ce4f (patch)
tree212d7f1362f9a939b8c429292adcfbf727254cf6 /builtin/clone.c
parent68b939b2f097b6675c4aaa178655559aa81b25cb (diff)
clone: treat "checking connectivity" like other progress
When stderr does not point to a tty, we typically suppress "we are now in this phase" progress reporting (e.g., we ask the server not to send us "counting objects" and the like). The new "checking connectivity" message is in the same vein, and should be suppressed. Since clone relies on the transport code to make the decision, we can simply sneak a peek at the "progress" field of the transport struct. That properly takes into account both the verbosity and progress options we were given, as well as the result of isatty(). Note that we do not set up that progress flag for a local clone, as we do not fetch using the transport at all. That's acceptable here, though, because we also do not perform a connectivity check in that case. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/clone.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 42c40f2..72cc40a 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -551,12 +551,12 @@ static void update_remote_refs(const struct ref *refs,
const struct ref *rm = mapped_refs;
if (check_connectivity) {
- if (0 <= option_verbosity)
+ if (transport->progress)
fprintf(stderr, _("Checking connectivity... "));
if (check_everything_connected_with_transport(iterate_ref_map,
0, &rm, transport))
die(_("remote did not send all necessary objects"));
- if (0 <= option_verbosity)
+ if (transport->progress)
fprintf(stderr, _("done\n"));