git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: git@vger.kernel.org
Subject: [PATCH] checkout: hide progress bar when stderr is not a tty
Date: Thu, 30 Jul 2009 18:13:34 +0200	[thread overview]
Message-ID: <1248970414-21851-1-git-send-email-mmarek@suse.cz> (raw)

The correct fix would be in start_progress_delay(), however this breaks
the progress bar for fetch/push via ssh. So fix it in this caller which
will always run locally.

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 unpack-trees.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/unpack-trees.c b/unpack-trees.c
index 720f7a1..a11f559 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -75,7 +75,7 @@ static int check_updates(struct unpack_trees_options *o)
 	int i;
 	int errs = 0;
 
-	if (o->update && o->verbose_update) {
+	if (o->update && o->verbose_update && isatty(STDERR_FILENO)) {
 		for (total = cnt = 0; cnt < index->cache_nr; cnt++) {
 			struct cache_entry *ce = index->cache[cnt];
 			if (ce->ce_flags & (CE_UPDATE | CE_REMOVE))
-- 
1.6.4.13.ge6580.dirty

                 reply	other threads:[~2009-07-30 16:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248970414-21851-1-git-send-email-mmarek@suse.cz \
    --to=mmarek@suse.cz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).