From: Junio C Hamano Date: Sat, 31 Oct 2015 17:37:50 GMT Subject: Re: [PATCH] checkout: add --progress option Message-ID: In-Reply-To: Edmundo Carmona Antoranz writes: > + /* > + * 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 do find what Peff showed us a lot easier to follow. if (opts.show_progress < 0) { if (opts.quiet) opts.show_progress = 0; else opts.show_progress = isatty(2); }