aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2009-12-26 01:12:03 +0800
committerJunio C Hamano <gitster@pobox.com>2009-12-28 18:49:18 -0800
commit486a3d716427ac81594fe63d4e9cae64703dbc56 (patch)
tree1c13bedf6777331e9d88ae402605f47e117fa02d /transport.c
parent902f235378cb2b2f6dd5dd664b9630c95321f0ae (diff)
downloadgit-486a3d716427ac81594fe63d4e9cae64703dbc56.tar.gz
git-486a3d716427ac81594fe63d4e9cae64703dbc56.tar.xz
check stderr with isatty() instead of stdout when deciding to show progress
Make transport code (viz. transport.c::fetch_refs_via_pack() and transport-helper.c::standard_options()) that decides to show progress check if stderr is a terminal, instead of stdout. After all, progress reports (via the API in progress.[ch]) are sent to stderr. Update the documentation for git-clone to say "standard error" as well. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 7362ec09b..31c88f33a 100644
--- a/transport.c
+++ b/transport.c
@@ -476,7 +476,7 @@ static int fetch_refs_via_pack(struct transport *transport,
args.include_tag = data->followtags;
args.verbose = (transport->verbose > 0);
args.quiet = (transport->verbose < 0);
- args.no_progress = args.quiet || (!transport->progress && !isatty(1));
+ args.no_progress = args.quiet || (!transport->progress && !isatty(2));
args.depth = data->depth;
for (i = 0; i < nr_heads; i++)