path: root/builtin/fetch.c
diff options
authorClemens Buchacher <>2012-02-13 20:17:15 (GMT)
committerJunio C Hamano <>2012-02-13 21:06:53 (GMT)
commit01fdc21f6e90f56fc5a49cbba751d9ead19b2f03 (patch)
tree7a8503c31417735d5765ddd1c2a63749e254d513 /builtin/fetch.c
parent58d4203aa617293d1dc3746a1ea33d84eb766e0f (diff)
push/fetch/clone --no-progress suppresses progress output
By default, progress output is disabled if stderr is not a terminal. The --progress option can be used to force progress output anyways. Conversely, --no-progress does not force progress output. In particular, if stderr is a terminal, progress output is enabled. This is unintuitive. Change --no-progress to force output off. Signed-off-by: Clemens Buchacher <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/fetch.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 0481c16..8ec4eae 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -30,7 +30,7 @@ enum {
static int all, append, dry_run, force, keep, multiple, prune, update_head_ok, verbosity;
-static int progress, recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
+static int progress = -1, recurse_submodules = RECURSE_SUBMODULES_DEFAULT;
static int tags = TAGS_DEFAULT;
static const char *depth;
static const char *upload_pack;
@@ -78,7 +78,7 @@ static struct option builtin_fetch_options[] = {
OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
OPT_BOOLEAN('u', "update-head-ok", &update_head_ok,
"allow updating of HEAD ref"),
- OPT_BOOLEAN(0, "progress", &progress, "force progress reporting"),
+ OPT_BOOL(0, "progress", &progress, "force progress reporting"),
OPT_STRING(0, "depth", &depth, "depth",
"deepen history of shallow clone"),
{ OPTION_STRING, 0, "submodule-prefix", &submodule_prefix, "dir",