Skip to content

Commit

Permalink
Merge branch 'ap/checkout-no-progress-for-non-tty'
Browse files Browse the repository at this point in the history
The progress indicator for a large "git checkout" was sent to stderr
even if it is not a terminal.
  • Loading branch information
Junio C Hamano committed May 25, 2012
2 parents 9972c8e + e9fc64c commit aed79af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit aed79af

Please sign in to comment.