Merge branch 'ap/checkout-no-progress-for-non-tty'
authorJunio C Hamano <gitster@pobox.com>
Fri, 25 May 2012 19:06:34 +0000 (12:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 May 2012 19:06:34 +0000 (12:06 -0700)
The progress indicator for a large "git checkout" was sent to stderr
even if it is not a terminal.

1  2 
builtin/checkout.c
diff --combined builtin/checkout.c
index 3ddda34f7a96c56707614dbaac40631467a2b54b,f9f7f40afbcdc717a169bcefc345ff7e462ba110..e8c1b1f189f077529ef2a79accb46ef21a9b8fe7
@@@ -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);