From: Eric Sunshine Date: Fri, 30 Oct 2015 18:12:54 GMT Subject: Re: [PATCH] checkout: add --progress option Message-ID: In-Reply-To: <1446168186-4730-1-git-send-email-eantoranz@gmail.com> On Thu, Oct 29, 2015 at 9:23 PM, Edmundo Carmona Antoranz wrote: > Under normal circumstances, and like other git commands, > git checkout will write progress info to stderr if > attached to a terminal. This option allows progress > to be forced even if not using a terminal. Also, > progress can be skipped if using option --no-progress. > > Signed-off-by: Edmundo Carmona Antoranz > --- > - opts.verbose_update = !o->quiet && isatty(2); > + /** > + * Rules to display progress: > + * -q is selected > + * no verbiage > + * -q is _not_ selected and --no-progress _is_ selected, > + * progress will be skipped > + * -q is _not_ selected and --progress _is_ selected, > + * progress will be printed to stderr > + * -q is _not_ selected and --progress is 'undefined' > + * progress will be printed to stderr _if_ working on a terminal > + */ > + opts.verbose_update = !o->quiet && (option_progress > 0 || > + (option_progress < 0 && isatty(2))); Does this logic also need to be applied to the other instance where isatty() is consulted in merge_working_tree()?