summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 902f235)
raw | patch | inline | side by side (parent: 902f235)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Fri, 25 Dec 2009 17:12:03 +0000 (01:12 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 29 Dec 2009 02:49:18 +0000 (18:49 -0800) |
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>
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>
Documentation/git-clone.txt | patch | blob | history | |
transport-helper.c | patch | blob | history | |
transport.c | patch | blob | history | |
transport.h | patch | blob | history |
index 7ccd742a87db1541184868b794fa4ef597d04de8..f298fdd4c2fd666c5a297b235ba6fbd6581cee24 100644 (file)
--verbose::
-v::
- Display the progress bar, even in case the standard output is not
+ Display the progress bar, even in case the standard error is not
a terminal.
--no-checkout::
diff --git a/transport-helper.c b/transport-helper.c
index 5078c7100f16e9d7ac08aad05e3797ad5b6626bc..bfe3bc30a97aaa0872d9570a2f93f8f4f6fdb492 100644 (file)
--- a/transport-helper.c
+++ b/transport-helper.c
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");
diff --git a/transport.c b/transport.c
index 7362ec09b2cbc6752489286a8280c16d3519f163..31c88f33a567d403859dd00a33c8f51ab31b030f 100644 (file)
--- a/transport.c
+++ b/transport.c
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++)
diff --git a/transport.h b/transport.h
index e4e6177e2632b4a764703c11ef0a8033eafea037..98bb623c4549ec90a749ce02aa3455e3966ed780 100644 (file)
--- a/transport.h
+++ b/transport.h
int (*disconnect)(struct transport *connection);
char *pack_lockfile;
signed verbose : 3;
- /* Force progress even if the output is not a tty */
+ /* Force progress even if stderr is not a tty */
unsigned progress : 1;
};