summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2009-12-25 17:12:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-12-29 02:49:18 (GMT)
commit486a3d716427ac81594fe63d4e9cae64703dbc56 (patch)
tree1c13bedf6777331e9d88ae402605f47e117fa02d /transport-helper.c
parent902f235378cb2b2f6dd5dd664b9630c95321f0ae (diff)
downloadgit-486a3d716427ac81594fe63d4e9cae64703dbc56.zip
git-486a3d716427ac81594fe63d4e9cae64703dbc56.tar.gz
git-486a3d716427ac81594fe63d4e9cae64703dbc56.tar.bz2
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-helper.c')
-rw-r--r--transport-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 5078c71..bfe3bc3 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -144,7 +144,7 @@ static void standard_options(struct transport *t)
char buf[16];
int n;
int v = t->verbose;
- int no_progress = v < 0 || (!t->progress && !isatty(1));
+ int no_progress = v < 0 || (!t->progress && !isatty(2));
set_helper_option(t, "progress", !no_progress ? "true" : "false");