diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-25 12:06:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-25 12:06:34 -0700 |
commit | aed79af5d9cec17a920ce806c5d5d2669591b00b (patch) | |
tree | 83a9f1bed55662d8885bb00e9c68e4feefd18958 /builtin | |
parent | 9972c8ea49ea95a841fd35fe847bc1062abe5a44 (diff) | |
parent | e9fc64c60a71a190016a9e9bcb81195a0fa0d9f4 (diff) | |
download | git-aed79af5d9cec17a920ce806c5d5d2669591b00b.tar.gz |
Merge branch 'ap/checkout-no-progress-for-non-tty'
The progress indicator for a large "git checkout" was sent to stderr
even if it is not a terminal.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 3ddda34f7a..e8c1b1f189 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -343,7 +343,7 @@ static int reset_tree(struct tree *tree, struct checkout_opts *o, int worktree) opts.reset = 1; opts.merge = 1; opts.fn = oneway_merge; - opts.verbose_update = !o->quiet; + opts.verbose_update = !o->quiet && isatty(2); opts.src_index = &the_index; opts.dst_index = &the_index; parse_tree(tree); @@ -420,7 +420,7 @@ static int merge_working_tree(struct checkout_opts *opts, topts.update = 1; topts.merge = 1; topts.gently = opts->merge && old->commit; - topts.verbose_update = !opts->quiet; + topts.verbose_update = !opts->quiet && isatty(2); topts.fn = twoway_merge; if (opts->overwrite_ignore) { topts.dir = xcalloc(1, sizeof(*topts.dir)); |