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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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))


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]