git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] checkout: hide progress bar when stderr is not a tty

From
Michal Marek <mmarek@suse.cz>
Date
Jul 30, 2009, 16:13 UTC
Message-ID
<1248970414-21851-1-git-send-email-mmarek@suse.cz>

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
Message 1 of 1 in “checkout: hide progress bar when stderr is not a tty”
  1. checkout: hide progress bar when stderr is not a ttyMichal Marek, Jul 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.