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

Re: [PATCH 4/4] Display a progress meter during merge-recursive.

From
Junio C Hamano <junkio@cox.net>
Date
Jan 14, 2007, 19:11 UTC
Message-ID
<7vwt3pfmph.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0701141404160.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> this is a nice idea, but I think you lack a "if (!isatty(1)) do_progress = 
> 0;" somewhere.
Very true.  Something like this?
diff --git a/merge-recursive.c b/merge-recursive.c
index 27a861b..fa320eb 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1335,6 +1335,8 @@ int main(int argc, char *argv[])
 		buffer_output = 0;
 		do_progress = 0;
 	}
+	else
+		do_progress = isatty(1);
 
 	branch1 = argv[++i];
 	branch2 = argv[++i];
@@ -1344,10 +1346,7 @@ int main(int argc, char *argv[])
 
 	branch1 = better_branch_name(branch1);
 	branch2 = better_branch_name(branch2);
-	if (verbosity >= 5) {
-		buffer_output = 0;
-		do_progress = 0;
-	}
+
 	if (do_progress)
 		setup_progress_signal();
 	if (show(3))
Previous: Johannes SchindelinNext: Shawn O. Pearce
Message 5 of 6 in “Allow the user to control the verbosity of merge-recursive.”
  1. 2/4 Allow the user to control the verbosity of merge-recursive.Shawn O. Pearce, Jan 14, 2007
  2. 3/4 Enable output buffering in merge-recursive.Shawn O. Pearce, Jan 14, 2007
  3. 4/4 Display a progress meter during merge-recursive.Shawn O. Pearce, Jan 14, 2007
  4. Johannes SchindelinJan 14, 2007
  5. Junio C HamanoJan 14, 2007
  6. Shawn O. PearceJan 14, 2007

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.