summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-02-21 15:14:37 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-02-21 15:14:37 -0800
commitc7707a4354f36c59f3310d4edfb18377c064220e (patch)
treee77a6031b8e1f5b700d334389a3235313d4d642f /transport.c
parentMerge branch 'jk/git-dir-lookup' into maint (diff)
parentpush/fetch/clone --no-progress suppresses progress output (diff)
downloadtgif-c7707a4354f36c59f3310d4edfb18377c064220e.tar.xz
Merge branch 'cb/transfer-no-progress' into maint
* cb/transfer-no-progress: push/fetch/clone --no-progress suppresses progress output
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/transport.c b/transport.c
index cac0c065ff..401b8dd35c 100644
--- a/transport.c
+++ b/transport.c
@@ -993,11 +993,15 @@ void transport_set_verbosity(struct transport *transport, int verbosity,
* Rules used to determine whether to report progress (processing aborts
* when a rule is satisfied):
*
- * 1. Report progress, if force_progress is 1 (ie. --progress).
- * 2. Don't report progress, if verbosity < 0 (ie. -q/--quiet ).
- * 3. Report progress if isatty(2) is 1.
+ * . Report progress, if force_progress is 1 (ie. --progress).
+ * . Don't report progress, if force_progress is 0 (ie. --no-progress).
+ * . Don't report progress, if verbosity < 0 (ie. -q/--quiet ).
+ * . Report progress if isatty(2) is 1.
**/
- transport->progress = force_progress || (verbosity >= 0 && isatty(2));
+ if (force_progress >= 0)
+ transport->progress = !!force_progress;
+ else
+ transport->progress = verbosity >= 0 && isatty(2);
}
int transport_push(struct transport *transport,