summaryrefslogtreecommitdiff
path: root/builtin-clone.c
diff options
context:
space:
mode:
authorLibravatar Tay Ray Chuan <rctay89@gmail.com>2010-02-24 20:50:26 +0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-02-24 08:35:44 -0800
commitd01b3c02e8a066054c308ee2ce521a2ea44738d3 (patch)
tree75fb151e00c082a805a3cd067b3cc89f11359e45 /builtin-clone.c
parentclone: support multiple levels of verbosity (diff)
downloadtgif-d01b3c02e8a066054c308ee2ce521a2ea44738d3.tar.xz
transport->progress: use flag authoritatively
Set transport->progress in transport.c::transport_set_verbosity() after checking for the appropriate conditions (eg. --progress, isatty(2)), and thereafter use it without having to check again. The rules used are as follows (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. This changes progress reporting behaviour such that if both --progress and --quiet are specified, progress is reported. In two areas, the logic to determine whether to *not* show progress is changed to simply use the negation of transport->progress. This changes behaviour in some ways (see previous paragraph for details). Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-clone.c')
-rw-r--r--builtin-clone.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin-clone.c b/builtin-clone.c
index 959fe4b59e..05f8fb4771 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -525,10 +525,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
transport_set_option(transport, TRANS_OPT_DEPTH,
option_depth);
- transport_set_verbosity(transport, option_verbosity);
-
- if (option_progress)
- transport->progress = 1;
+ transport_set_verbosity(transport, option_verbosity, option_progress);
if (option_upload_pack)
transport_set_option(transport, TRANS_OPT_UPLOADPACK,