summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-21 23:14:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-21 23:14:37 (GMT)
commitc7707a4354f36c59f3310d4edfb18377c064220e (patch)
treee77a6031b8e1f5b700d334389a3235313d4d642f /transport.c
parent0cfba96121b9617668a7b4ad18e3ae3a19dc8755 (diff)
parent01fdc21f6e90f56fc5a49cbba751d9ead19b2f03 (diff)
downloadgit-c7707a4354f36c59f3310d4edfb18377c064220e.zip
git-c7707a4354f36c59f3310d4edfb18377c064220e.tar.gz
git-c7707a4354f36c59f3310d4edfb18377c064220e.tar.bz2
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 cac0c06..401b8dd 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,