From: Junio C Hamano Date: Fri, 25 May 2012 19:06:34 +0000 (-0700) Subject: Merge branch 'ap/checkout-no-progress-for-non-tty' X-Git-Tag: v1.7.11-rc0~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/aed79af5d9cec17a920ce806c5d5d2669591b00b?ds=inline;hp=-c 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. --- aed79af5d9cec17a920ce806c5d5d2669591b00b diff --combined builtin/checkout.c index 3ddda34f7a,f9f7f40afb..e8c1b1f189 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@@ -343,7 -343,7 +343,7 @@@ static int reset_tree(struct tree *tree 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 +420,7 @@@ static int merge_working_tree(struct ch 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)); @@@ -543,7 -543,6 +543,7 @@@ static void update_refs_for_switch(stru opts->new_branch_force ? 1 : 0, opts->new_branch_log, opts->new_branch_force ? 1 : 0, + opts->quiet, opts->track); new->name = opts->new_branch; setup_branch_path(new);