Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15

Re: [PATCH] checkout: refactor of --progress option

From: Edmundo Carmona Antoranz <hidden>
Date: 2016-06-15 23:07:07

On Sat, Oct 31, 2015 at 10:57 AM, Edmundo Carmona Antoranz
[off-list ref] wrote:
+       /*
+        * Final processing of show_progress
+        * Any of these 3 conditions will make progress output be skipped:
+        * - selected --quiet
+        * - selected --no-progress
+        * - didn't select --progress and not working on a terminal
+        */
+       opts.show_progress = !opts.quiet && opts.show_progress &&
+                            (opts.show_progress > 0 || isatty(2));
+
I did a very small adjustment there from what I had sent yesterday.

It was (opts.show_progress >= 0 || isatty(2))

It was unnecessary to include the case of a 0 because it was discarded
by the second item on the outer short-circuited if:
opts_show_progress.

Let me know of your feedback and thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help