aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-01 12:59:50 -0700
committerJunio C Hamano <gitster@pobox.com>2012-06-01 12:59:51 -0700
commit63cdf160f335758e80e898cda6d6cdaca72dc745 (patch)
tree91dcbdfb096e8b3364376ea2dddd23e5a5735f8d
parent9c136bfb487d2b3d66cb09c763330822329497a0 (diff)
parente9fc64c60a71a190016a9e9bcb81195a0fa0d9f4 (diff)
downloadgit-63cdf160f335758e80e898cda6d6cdaca72dc745.tar.gz
git-63cdf160f335758e80e898cda6d6cdaca72dc745.tar.xz
Merge branch 'ap/checkout-no-progress-for-non-tty' into maint
"git checkout" gave progress display even when the standard error stream was not connected to the tty, which made little sense. By Avery Pennarun * ap/checkout-no-progress-for-non-tty: checkout: no progress messages if !isatty(2).
-rw-r--r--builtin/checkout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index c3647934c..f9f7f40af 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));